NetTalk Central

Author Topic: Cant read a page with Nettalk Fetch like explorer/fiddler does  (Read 3632 times)

Alberto

  • Hero Member
  • *****
  • Posts: 1873
    • MSN Messenger - alberto-michelis@hotmail.com
    • View Profile
    • ARMi software solutions
    • Email
Hi,
I need toread prices froma web page.

Using Fiddler to look at what the browser does...
If I get this page:

http://www.bolsar.com/VistasDL/PaginaLideres.aspx/GetDataPack

I get a page full of prices,

Especie         Vto.   Cant. Nominal   Precio Compra   Precio Venta   Cant. Nominal   Último   Variación %   Máximo   Mínimo   Cierre Ant.   Vol. Nominal   Monto Operado ($)   Cant. Ope.   Hora Cotización
ALUA      72 hs.   1,242   10,850   10,900   4,548   10,900   -1,36    11,100   10,850   11,050   530,602   5,843,577   216   15:47:35
APBR      72 hs.   415   55,250   55,400   848   55,400   -0,36    56,500   54,600   55,600   297,674   16,411,003   452   15:46:27

If I GET this page with NetDemo.app I get many characters but nothing like what I see in a browser.

Looking at what thw web pagedoes with Fiddler I see it do some POSTs to get the prices and this posts returns all the data in JSON format.

Then I try to do the GET and POSTs with NetDemo.app and what I get is the same.
No JSON data is returned by the POST

I`m staked!!!
How can I do it??
Please help!!

Thanks again!!!!
-----------
Regards
Alberto

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Cant read a page with Nettalk Fetch like explorer/fiddler does
« Reply #1 on: May 04, 2015, 12:40:37 AM »
Presumably there's a difference between what the browser is sending and what you are sending.
Maybe something in a header?

cheers
Bruce

Alberto

  • Hero Member
  • *****
  • Posts: 1873
    • MSN Messenger - alberto-michelis@hotmail.com
    • View Profile
    • ARMi software solutions
    • Email
Re: Cant read a page with Nettalk Fetch like explorer/fiddler does
« Reply #2 on: May 04, 2015, 02:25:45 AM »
I am sending what I see in Fiddler, the same GETS and POSTS and cant read it.
Atached goes the FIddler session.
Please Help!
I need to read this page.
Thanks


[attachment deleted by admin]
-----------
Regards
Alberto

Alberto

  • Hero Member
  • *****
  • Posts: 1873
    • MSN Messenger - alberto-michelis@hotmail.com
    • View Profile
    • ARMi software solutions
    • Email
Re: Cant read a page with Nettalk Fetch like explorer/fiddler does
« Reply #3 on: May 06, 2015, 08:13:49 AM »
Please Bruce!
It must be any way to do it!
Problem is, i think, some js scripts in the page, they are who extract an shows the prices in the browser.
How can I replicate this behaviour with nettalk?

Thanks
Sory the insistance but I'm very worried about this.

Regards
-----------
Regards
Alberto

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Cant read a page with Nettalk Fetch like explorer/fiddler does
« Reply #4 on: May 07, 2015, 06:36:15 AM »
Hi Alberto,

Unfortunately it's not possible for me to investigate each web page, and ultimately do the work to extract data from that page. I just don't have the time. Sorry.

But you have all the tools you need to do it yourself, and ultimately if you do it yourself it will be much better for you.

From the Fiddler log you can see the pattern of requests, and replies which this web site is doing. All you need to do is mimic that pattern using the web client. You need to match what they are asking for, in the sequence they are asking for. Pay particular attention to the request headers, including the XMLRequestHeader, Content-Type, Accept and so on.
You should also make sure net.optionAutoCookie is on.

If you mimic the browser you will get the same answers. There's no magic in thism you just need to examine the requests carefully and formulate your own to do the same thing.

cheers
Bruce