Coder Social home page Coder Social logo

Comments (8)

bpschuck avatar bpschuck commented on June 23, 2024

@3aboooody56
Thanks for the info.
It would be appreciated if you could create a pull request. Please note that we ask to update "Changes" and "Modules-README.yml" to save us some housecleaning time when preparing to push a release to CPAN. As always, check for a clean execution of the test script and update any symbols that are no longer traded.

from finance-quote.

3aboooody56 avatar 3aboooody56 commented on June 23, 2024

@bpschuck

The changes I mentioned earlier partially fix the Bloomberg module. After testing the changes, the module fails to retrieve the prices for US / USD-based stocks (works for other stocks). The HTML document/webpage is different for US stocks - at least the HTML elements that contain the stock price are different. I tried fixing this by having two separate look_down method calls for the two cases.

But I am currently running into another issue with this other HTML webpage for US stocks where the HTML page content that is pulled by the module (Opened as a text file) is missing the price or at least where it should be:

<div class="currentPrice_currentPriceContainer__nC8vw">
   <div class="priceDelta_price__Acvmw">
      <span class="priceDelta_black__KE45q"></span>

When opening that same HTML page content that was pulled by the module in a browser, the price shows up in the HTML content as follows:

<div class="currentPrice_currentPriceContainer__nC8vw">
   <div class="priceDelta_price__Acvmw">
      <span class="priceDelta_black__KE45q">141.18</span>

This was the case for GOOGL:US.

Would appreciate any insight as to why this happens and what can be done about it. Thanks.

from finance-quote.

bpschuck avatar bpschuck commented on June 23, 2024

@3aboooody56
Sorry, but I currently don't have the time to troubleshoot the module. Apparently Bloomberg has made changes to the structure of the web pages that break the parsing logic in the module. There is a similar issue with the Fidelity.pm that was discovered 6 months ago.

from finance-quote.

pghmcfc avatar pghmcfc commented on June 23, 2024

@bpschuck, @3aboooody56

Would appreciate any insight as to why this happens and what can be done about it. Thanks.

Looks like it fills in the price using some javascript. Came across the exact same issue when looking at this yesterday. Fortunately, there is a giant blob of JSON embedded as a script in the page, from which it is easy to extract the data. PR incoming soon.

from finance-quote.

3aboooody56 avatar 3aboooody56 commented on June 23, 2024

Thanks for the fix.

As a GnuCash user, how can I have it use a modified version of F: :Q instead of having to wait for the next release?

from finance-quote.

pghmcfc avatar pghmcfc commented on June 23, 2024

@3aboooody56

  • Go to the pull request at #362
  • Select the "Files changed" tab
  • In the code tree view on the left hand side, click on the file of interest, "Bloomberg.pm"
  • In the main part of the window, from the menu ("...") for that file, select "View file"
  • When the modified file is shown, click the "Download raw file" option (to the right of the "Raw" button)
  • Replace the file "Bloomberg.pm" in your current installation with the one you just downloaded

That should do it.

from finance-quote.

3aboooody56 avatar 3aboooody56 commented on June 23, 2024

Thanks, that worked. Took me a bit to find the version of Perl and F::Q that GnuCash was using.

from finance-quote.

bpschuck avatar bpschuck commented on June 23, 2024

Thanks, that worked. Took me a bit to find the version of Perl and F::Q that GnuCash was using.

@3aboooody56

That is typically why I don't typically even attempt to answer questions about installing individual modules. For those with experience in Perl it is simple. But it is possible to find multiple instances of F::Q installed.

from finance-quote.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.