ccpandhare / stock-analyser

0 stars 0 forks source link

Error when scraping for links #8

Closed AshutoshSancheti closed 2 years ago

AshutoshSancheti commented 2 years ago

Using LIMIT 1 Scraping RELIANCE *** Programme failed. Traceback (most recent call last): File "cli", line 20, in stocks = [scrape(session, ticker) for ticker in tickers] File "cli", line 20, in stocks = [scrape(session, ticker) for ticker in tickers] File "C:\Users\MATCO\Desktop\ashus_backup\Desktop\work\Project\stock-analyser\lib\scraper.py", line 33, in scrape annual_reports = parse_documents( File "C:\Users\MATCO\Desktop\ashus_backup\Desktop\work\Project\stock-analyser\lib\scraper.py", line 73, in parse_documents documents = [{ File "C:\Users\MATCO\Desktop\ashus_backup\Desktop\work\Project\stock-analyser\lib\scraper.py", line 74, in "name": link.select_one('div').previous_sibling.text.strip(), File "C:\Users\MATCO\anaconda3\lib\site-packages\bs4\element.py", line 921, in getattr raise AttributeError( AttributeError: 'NavigableString' object has no attribute 'text'

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "cli", line 37, in debug(err) File "C:\Users\MATCO\Desktop\ashus_backup\Desktop\work\Project\stock-analyser\lib\utils\args.py", line 33, in debug lines = message.split('\n') AttributeError: 'AttributeError' object has no attribute 'split'

ccpandhare commented 2 years ago

Hmm that’s interesting - let me have a look

ccpandhare commented 2 years ago

Looks like this might be a platform specific thing - will try to fix