database-automation/news/backfill_news.py

9 lines
297 B
Python
Raw Permalink Normal View History

2023-10-25 13:31:23 +00:00
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)