Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have a list of movies in a text file. I would like some way to automatically obtain the IMDB movie hyperlinks for each item in my list. Is this possible?

share|improve this question

2 Answers 2

Although this isn't a direct link to the IMDB for the movie, it will probably work in most cases. Just use Google's I'm Feeling Lucky feature. Of course you will need to URL encode the movie title, but something like this should work:

http://www.google.com/search?q=imdb+%22Movie+Title%22&btnI=I%27m+Feeling+Lucky

Replacing Movie+Title with each URL encoded title of course.

Here is an Excel VBA macro you can use to do URL encoding(courtesy of Motobit):

Function URLEncode(ByVal Data, CharSet)
  'Create a ByteArray object
  Dim ByteArray: Set ByteArray = CreateObject("ScriptUtils.ByteArray")
  If Len(CharSet)>0 Then ByteArray.CharSet = CharSet

  ByteArray.String = Data

  If ByteArray.Length > 0 Then
    Dim I, C, Out

    For I = 1 To ByteArray.Length
      'For each byte of the encoded data
      C = ByteArray(I)
      If C = 32 Then 'convert space to +
        Out = Out + "+"
      ElseIf (C < 48 Or c>126) Or (c>56 And c<=64) Then
        Out = Out + "%" + Hex(C)
      Else
        Out = Out + Chr(c)
      End If
    Next
    URLEncode = Out
  End If
End Function
share|improve this answer

Check out some of the samples provided by Dean Clatworthy.

share|improve this answer
    
Although, I suggest you hurry because March 1st is your deadline before IMDB's new ToS kick in. –  Scott Feb 17 '10 at 21:37

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.