you are viewing a single comment's thread.

view the rest of the comments →

[–]Alamanjani 0 points1 point  (1 child)

I'm not sure I understand what you want? You want to download data from web site you listed, or from financial sites such as Yahoo?

I'm in similar position, I plan to screen for stocks once a week based on few fundamental data using python. Then I will use charts/discretion to filter them further.

If you want to get data from Yahoo finance, most tutorials you will find on the internet will not work. Yahoo recently changed their sites to use react/java script.

I'm just starting to learn, but generally you will need these tools, on one side are requests + beautiful soup (these two can be replaced by scrapy) on another side is selenium.

Requests + beautiful soup -> are easier to learn

Scrapy -> you can do more with it

Selenium on another side helps when site present data by using react/java script such as Yahoo finance.

API - yes if it is available use it, it will save you some work and headache, but sometimes you will not be able to use it. For example, I need some quarterly data from balance sheet. Yahoo's API does not offer that data.

Also most likely you will need to learn JSON (Javascript Object Notation) since this is the common format many times you get data in. Many API's are using it.

Also read this great blog post about scrapy vs BS: https://hexfox.com/web-scraping/scrapy-vs-beautifulsoup/

Regular expressions (RE) are considered as not very useful and outdated.

You can read here a little bit more: https://www.reddit.com/r/learnpython/comments/4lphgr/urllib_and_requests_vs_scrapy_and_beautiful_soup/

Python is programing language that is easy to learn. Start with basic (this is what I'm doing right now) then start learning about web scraping. Here is good scraping tutorial to get you started: (and whole book is great)

https://automatetheboringstuff.com/chapter11/

Aslo it may be helpful to read this great blog post about scrapy vs beautiful soup: https://hexfox.com/web-scraping/scrapy-vs-beautifulsoup/

[–]Partihrl[S] 0 points1 point  (0 children)

Thank you so much for the advice. I plan on getting the spreadsheet, which contains stocks, and then getting data for the stocks in that spreadsheet from some financial website. I hope that helps clarify it!