Comments (2)
this is what i have so far:
from newsapi import NewsApiClient
import pandas as pd
from datetime import date, timedelta
newsapi = NewsApiClient(api_key='eb23958504c749a492b172c14a926be3')
startDate = date(2020, 5, 7)
endDate = date(2020, 5, 9)
delta = timedelta(days=1)
while startDate <= endDate:
try:
search_date_df = all_articles = newsapi.get_everything(q='coronavirus', from_param=startDate, to=startDate, language='en',)
search_date_df.to_csv(country+'_coronavirus.csv')
print(str(startDate) + ' was succesful')
startDate += delta
except Exception as e:
print(str(startDate) + ' failed' + str(e))
break
from newsapi-python.
Hi @onseau ,
Unfortunately, this issue tracker is not meant to assist people with projects, only to resolve issues with the underlying library.
Please look elsewhere for project support.
Best luck!
from newsapi-python.
Related Issues (20)
- Trying to use qInTitle and getting error HOT 1
- Bug report HOT 1
- Issue with endpoint HOT 1
- Library Partial Import Error HOT 1
- Enable use of proxies
- Content is not fully returned when run get_top_headlines() HOT 1
- Add search_in parameters
- I already imported newsapi and i got sucessfully package installed but i am getting no module error for NewsApiClient HOT 4
- get_top_headlines() not working HOT 5
- Error regarding Newsapi-python get_top_headlines() HOT 3
- Language list contains unavaliable or invalid codes
- there are no data come back HOT 2
- is_valid_string is too restrictive
- Missing searchIn
- get full article text
- cant import newsapi HOT 1
- Can't get top headlines for some countries (even though supported by the API)
- ImportError: cannot import name 'NewsApiClient' from 'newsapi HOT 1
- 'us' is working but 'kr', 'jp', 'cn' .. are not working HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from newsapi-python.