This site has data on stock and I'm trying to sub struct some data from this site. https://quickfs.net/company/AAPL:US
Where AAPL is a stock name and can be changed.
the page looks like a big table : the columns are years and the rows are calculated values like: Return on Assets and Gross Margin
For this I tried to follow few tutorials:
Introduction to Web Scraping (Python) - Lesson 02 (Scrape Tables)
Intro to Web Scraping with Python and Beautiful Soup
Web Scraping HTML Tables with Python
Web scraping with Python — A to Z Part A — Handling BeautifulSoup and avoiding blocks
I get stuck right at the beginning after importing the packages:
from bs4 import BeautifulSoup as soup
from urllib.request import urlopen as uReq
this function to retrive the data from the web page:
def make_soup(url):
thepage=uReq(url)
soupdata=soup(thepage, "html.parser")
return(soupdata)
then
soup=make_soup("https://quickfs.net/company/AAPL:US")
Now, when trying to look what data inside the soup
soup.text
The output is just this and not all the data from the webpage:
'\n\n\n\n\n\n\n\n\n\n\n\nExport Fundamental Data U.S. and International Stocks - QuickFS.net\n\n\n\n\n\n \r\n Loading QuickFS...\r\n \n\n\n\n\n\n\n\n\n\n\n\n\n\n'
I think it's a problem with the specific web page but I have no idea how to handle with this.
Entering different url the the function make_soup(url) sometimes do work.
Pleas your kind help