Selasa, 03 Desember 2019

[smf_addin] Digest Number 4655

3 Messages

Digest #4655
1a
Re: reuters by wongkayau
1b
Re: reuters by "Randy Harmelink" rharmelink
1c
Re: reuters by wongkayau

Messages

Mon Dec 2, 2019 11:19 am (PST) . Posted by:

wongkayau




Hi Randy,

Thanks again. Below is my latest vb. In Part1, 5year data is stored in webpage after clicked. in Part2, the XMLHTTP method can grab the data. However, it fails, showing only 3month data. Could you please what's the bug?

Thank you so much.

Cheers,
w


Sub test()

'Part1
Dim i As SHDocVw.InternetExplorer
Set i = New InternetExplorer
'i.Visible = True
i.navigate "https://www.reuters.wallst.com/reuters/enhancements/US/interactiveChart/chart.asp?symbol=0001.HK"

Do While i.readyState <> READYSTATE_COMPLETE
Loop
i.document.getElementsByTagName("li")(79).getElementsByTagName("a")(0).Click


'Part2
Dim req As New MSXML2.XMLHTTP60
Dim reqURL As String

reqURL = "https://www.reuters.wallst.com/reuters/enhancements/US/interactiveChart/chart.asp?symbol=0001.HK"
req.Open "POST", reqURL, False
req.setRequestHeader "Content-Type", "text/javascript"
req.send

Debug.Print req.responseText

End Sub

Mon Dec 2, 2019 11:57 am (PST) . Posted by:

"Randy Harmelink" rharmelink

Sorry, but I just don't have the time...

On Mon, Dec 2, 2019 at 12:19 PM wongkayau@... wrote:

>
>
> Thanks again. Below is my latest vb. In Part1, 5year data is stored in
> webpage after clicked. in Part2, the XMLHTTP method can grab the data.
> However, it fails, showing only 3month data. Could you please what's the
> bug?
>
>
>
> Thank you so much.
>
>
>
> Cheers,
>
> w
>
>
>
>
>
> Sub test()
>
>
>
> 'Part1
>
> Dim i As SHDocVw.InternetExplorer
>
> Set i = New InternetExplorer
>
> 'i.Visible = True
>
> i.navigate "
> https://www.reuters.wallst.com/reuters/enhancements/US/interactiveChart/chart.asp?symbol=0001.HK
> "
>
>
>
> Do While i.readyState <> READYSTATE_COMPLETE
>
> Loop
>
>
> i.document.getElementsByTagName("li")(79).getElementsByTagName("a")(0).Click
>
>
>
>
>
> 'Part2
>
> Dim req As New MSXML2.XMLHTTP60
>
> Dim reqURL As String
>
>
>
> reqURL = "
> https://www.reuters.wallst.com/reuters/enhancements/US/interactiveChart/chart.asp?symbol=0001.HK
> "
>
> req.Open "POST", reqURL, False
>
> req.setRequestHeader "Content-Type", "text/javascript"
>
> req.send
>
>
>
> Debug.Print req.responseText
>
>
>
> End Sub
>
>
>

Mon Dec 2, 2019 12:14 pm (PST) . Posted by:

wongkayau

no problem.

thanks

For the Add-in, Documentation, Templates, Tips and FAQs, visit http://ogres-crypt.com/SMF

Tidak ada komentar:

Posting Komentar