stevearama
New Member
- Joined
- Aug 31, 2019
- Messages
- 5
Can anyone help me to use the advanced options on excels DATA > Get Data > From Web menu, to overcome a redirecting URL?
The data I wish to scrape is from this url PAJ Oil Statistics Weekly
However, that URL redirects to here PAJ Oil Statistics Weekly .. which asks me to accept some condition.
Below I have some VBA code that will get me to the correct ULP, it works by first opening IE with the first ULP, then navigating to the second. This works fine, but I wish to implement this inside the Excel GET DATA from Web inteface so that I can scrape the data into excel
Hopefully that question is clear. Thank you for your guidance
The data I wish to scrape is from this url PAJ Oil Statistics Weekly
However, that URL redirects to here PAJ Oil Statistics Weekly .. which asks me to accept some condition.
Below I have some VBA code that will get me to the correct ULP, it works by first opening IE with the first ULP, then navigating to the second. This works fine, but I wish to implement this inside the Excel GET DATA from Web inteface so that I can scrape the data into excel
Hopefully that question is clear. Thank you for your guidance
VBA Code:
Sub WebLogin()
Dim a As String
Set ie = CreateObject("InternetExplorer.Application")
With ie
.Visible = True
.navigate "https://stats.paj.gr.jp/en/pub/index.php"
Do Until .readyState = 4
DoEvents
Loop
.navigate "https://stats.paj.gr.jp/en/pub/current_en_n2.html"
End With
End Sub