SI
SI
discoversearch

We've detected that you're using an ad content blocking browser plug-in or feature. Ads provide a critical source of revenue to the continued operation of Silicon Investor.  We ask that you disable ad blocking while on Silicon Investor in the best interests of our community.  If you are not using an ad blocker but are still receiving this message, make sure your browser's tracking protection is set to the 'standard' level.
Strategies & Market Trends : Value Investing -- Ignore unavailable to you. Want to Upgrade?


To: William Cloutier who wrote (60103)11/21/2017 10:12:24 AM
From: Mario :-)1 Recommendation

Recommended By
E_K_S

  Read Replies (1) | Respond to of 78765
 
I'm also learning how to code these days. I want to scrape from advfn for now.
Cool! What programming language are you using? I hope it is Python, then we can cooperate :-)

And thank you very much for mentioning advfn, it really is a great site for data. I'm checking it out right now. I love it how much data is available on every page. I love Company Data. Also, very importantly, most financial sites are now_a_days heavily embedded with react/JS stuff, where numbers are dynamically added from somewhere else and when you scrape site regular way, numbers are not there. That's why I was playing lately with Marketwatch since data is simple stored in tables.

Well so does advfn! And, I just learned few days ago, if data is placed into html table (without dynamical/react/JS stuff) you can retrieve numbers really really easy by using Pandas external library. Pandas does it all for you and once you have first few lines of code (imports, url...) and you dl data to your computer, you only need two simple lines to get data like this:



URL's are a little bit goofy though. There may be some work needed to work on them...
I have solution for now for first page (company data). The other two may be trickier for me, but I'm just starting with first baby steps so everything looks difficult to me :-)

Anyway, if you want more details, we can switch to PM so we don't clutter this forum too much.
Man I really hope you are using Python, it is the easiest to learn though (hint, hint in case you are not using it) ;-)))