BrianExcel
Well-known Member
- Joined
- Apr 21, 2010
- Messages
- 975
Good morning folks,
Right now I am using the following code that opens an Internet Explorer Browser window and navigates to a specific title on IMDB using the movie code (such as "tt0118531" for the movie "One Eight Seven").
This code works fine - but now I need to add a couple more steps.
1. I need to pull the title "One Eight Seven" from the HTML of the IMDB page. I have already located it in the HTML code, shown below:
(open code tag "title")One Eight Seven (1997) - IMDb(closing code tag "/title")
I need to know how to pull that title into column B - column A contains the movie code I referenced above.
2. The next step, is there is an image on that page of the movie cover box. I want to save that image to a folder of my choosing, and name the file as the title that we pulled in step 1.
I was unable to find where the specific image code is, so I am hoping someone can help me with that. Any thoughts from anyone?
Right now I am using the following code that opens an Internet Explorer Browser window and navigates to a specific title on IMDB using the movie code (such as "tt0118531" for the movie "One Eight Seven").
Code:
Public Sub NavigateToURL(ByVal argURL As String)
Const READYSTATE_COMPLETE As Integer = 4
Dim objIE As Object
Set objIE = CreateObject("InternetExplorer.Application")
With objIE
.Visible = True
.Silent = True
.Navigate argURL
Do Until .ReadyState = READYSTATE_COMPLETE
DoEvents
Loop
End With
'objIE.Quit
Set objIE = Nothing
0
End Sub
This code works fine - but now I need to add a couple more steps.
1. I need to pull the title "One Eight Seven" from the HTML of the IMDB page. I have already located it in the HTML code, shown below:
(open code tag "title")One Eight Seven (1997) - IMDb(closing code tag "/title")
I need to know how to pull that title into column B - column A contains the movie code I referenced above.
2. The next step, is there is an image on that page of the movie cover box. I want to save that image to a folder of my choosing, and name the file as the title that we pulled in step 1.
I was unable to find where the specific image code is, so I am hoping someone can help me with that. Any thoughts from anyone?
Last edited: