Re: Stock price fetch from ASX broken? 

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: Stock price fetch from ASX broken? 

ChrisGood
     Message: 4
     Date: Sat, 6 May 2017 11:59:21 +1000
     From: prl <[hidden email]>
     To: "[hidden email]" <[hidden email]>
     Subject: Stock price fetch from ASX broken?
     Message-ID: <[hidden email]>
     Content-Type: text/plain; charset=utf-8; format=flowed
     For the past two weeks, I haven't been able to fetch stock prices
     from
     the Australian Stock Exchange, AU (ASX) source in GnuCash.
     It looks like the ASX has changed something on their Web page that
     breaks the Finance::Quote screen scraper for ASX:
     Cambyses:bin prl$ ./gnc-fq-dump -v asx TLS
     Finance::Quote fields Gnucash uses:
          symbol: TLS (deduced)        <=== required
            date: ** missing **        <=== recommended
        currency: ** missing **        <=== required
            last:                      <=\
             nav:                      <=== one of these
           price:                      <=/
        timezone:                      <=== optional
     ** This stock quote cannot be used by GnuCash!
     All fields returned by Finance::Quote for stock TLS
     stock           field  value
     -----           -----  -----
     TLS          errormsg: Failed to parse HTML table.<<<<<< Here
     TLS              last: **missing**
     TLS               nav: **missing**
     TLS             price: **missing**
     TLS           success: 0
     Cambyses:bin prl$
     Using the yahoo_australia source for the same stock code works:
     Cambyses:bin prl$ ./gnc-fq-dump yahoo_australia TLS
     Finance::Quote fields Gnucash uses:
          symbol: TLS.AX               <=== required
            date: 05/05/2017           <=== recommended
        currency: AUD                  <=== required
            last: 4.40                 <=\
             nav:                      <=== one of these
           price: 4.40                 <=/
        timezone:                      <=== optional
     Cambyses:bin prl$
     I guess this is something I need to talk to the Finance::Quote
     maintainer about?
     Cheers,
     Peter

   Hi Peter,
   This was reported recently as starting around 21 April. I'm no web
   expert but I've had a look and it seems to me the web page used no
   longer works unless the browser supports javascript. I've found an
   alternate web page (m.asx.com.au for mobile devices) that doesn't seem
   to have this restriction and works from the perl library used so long
   as cookies are also turned on. Unfortunately, I cannot find a way for
   it to request quotes for multiple stocks at once, so the fix I'm
   working on maybe slower than it was. Also, it doesn't include all the
   info that it previously did, but it does have enough for GnuCash. I
   hope to have a fix available in a couple of days.
   There is another m.asx.com.au page that does contain all the previous
   info but also needs javascript. If anyone can find a way to bypass the
   javascript problem, I'd like to hear it. I've tried  setting UserAgent
   to pretend to be various versions of IE.
   I haven't supplied the exact urls now as I'm not at my computer. If
   anyone can help, please let me know.
   Also, Eric Colson (the Finance::Quote maintainer as far as I know)
   seems to be incommunicado, so I can only supply a fix file to be
   manually installed, not get my fix incorporated into F::Q.
   Thankfully yahoo_australia is an alternative but it's good to have a
   working backup source for aussie quotes.
   Regards, Chris Good
_______________________________________________
gnucash-devel mailing list
[hidden email]
https://lists.gnucash.org/mailman/listinfo/gnucash-devel
Reply | Threaded
Open this post in threaded view
|

Re: Stock price fetch from ASX broken?

Graham Menhennitt-3
On 6/05/2017 10:16 PM, Chris Good wrote:

          Date: Sat, 6 May 2017 11:59:21 +1000
          From: prl <[hidden email]>
          To: "[hidden email]" <[hidden email]>
          Subject: Stock price fetch from ASX broken?
          Message-ID: <[hidden email]>
          Content-Type: text/plain; charset=utf-8; format=flowed
          For the past two weeks, I haven't been able to fetch stock prices
          from
          the Australian Stock Exchange, AU (ASX) source in GnuCash.
          It looks like the ASX has changed something on their Web page that
          breaks the Finance::Quote screen scraper for ASX:


>     This was reported recently as starting around 21 April. I'm no web
>     expert but I've had a look and it seems to me the web page used no
>
For anybody suffering from this problem, a workaround is to change the
source of prices from ASX to Yahoo Australia.

Graham
_______________________________________________
gnucash-devel mailing list
[hidden email]
https://lists.gnucash.org/mailman/listinfo/gnucash-devel