Backfill script for news events
This commit is contained in:
parent
aad0cc59eb
commit
7035fe69dc
9
news/backfill_news.py
Normal file
9
news/backfill_news.py
Normal file
@ -0,0 +1,9 @@
|
||||
from database.news import insert
|
||||
from datetime import datetime
|
||||
from news import scrape_news_in_range
|
||||
|
||||
start_date = datetime(2023, 10, 25)
|
||||
end_date = datetime(2023, 10, 25)
|
||||
scrape_news_in_range(start_date, end_date)
|
||||
for news_data in scrape_news_in_range(start_date, end_date):
|
||||
insert(news_data)
|
5
news/requirements.txt
Normal file
5
news/requirements.txt
Normal file
@ -0,0 +1,5 @@
|
||||
pandas
|
||||
psycopg2
|
||||
python-dotenv
|
||||
schedule
|
||||
sqlalchemy
|
Loading…
Reference in New Issue
Block a user