dub-basu / cointelegraph-scraper Goto Github PK
View Code? Open in Web Editor NEWCommand line application to fetch news articles data from cointelegraph.com home page
License: MIT License
Command line application to fetch news articles data from cointelegraph.com home page
License: MIT License
I'm trying to run the code. It works well in the ES (Spanish) version of Cointelegraph but fails on the .COM (English site).
Error:
➜ cointelegraph-scraper (master) ✗ python3 main.py step1 --date 2020-09-14
INFO : ####### STARTING COINTELEGRAPH SCRAPER #######
INFO : Starting automated browser window.
DEBUG : Found accept button
DEBUG : Clicked accept button
DEBUG : Will now load more articles. Date limit: 2020-09-14
CRITICAL: Failed unexpectedly. Check logs.
ERROR : Exception occured
Traceback (most recent call last):
File "main.py", line 47, in <module>
function(date)
File "main.py", line 11, in step1
fetch_and_save(date_str, SOURCE_FILE)
File "/Users/danielpolo/dev/cointelegraph-scraper/scraper.py", line 17, in fetch_and_save
load_more(driver, date_string)
File "/Users/danielpolo/dev/cointelegraph-scraper/scraper.py", line 64, in load_more
last_article_date = string_to_date(get_last_date(driver))
File "/Users/danielpolo/dev/cointelegraph-scraper/scraper.py", line 41, in get_last_date
while not is_url_valid(URL + articles_tags[last_index].header.a['href']):
File "/usr/local/lib/python3.8/site-packages/bs4/element.py", line 1368, in __getitem__
return self.attrs[key]
KeyError: 'href'
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.