mirror of
https://git.phreedom.club/localhost_frssoft/FMN_bot.git
synced 2024-11-10 13:30:57 +01:00
Download and update datasets script
This commit is contained in:
parent
b8a47f8db4
commit
4d9a30c5f5
|
@ -5,11 +5,9 @@ import logging
|
|||
|
||||
|
||||
def main():
|
||||
# imdb_datasets_worker.convert_datasets_to_db()
|
||||
|
||||
logging.basicConfig(level=logger_default_level)
|
||||
|
||||
#listener_mention.run_scan_notif() # Слушаем упоминания в фоне
|
||||
listener_mention.run_scan_notif() # Слушаем упоминания в фоне
|
||||
|
||||
listener_context.scan_context_thread() # Слушаем тред на новые предложения фильмов
|
||||
|
||||
|
|
19
update_imdb_database.py
Normal file
19
update_imdb_database.py
Normal file
|
@ -0,0 +1,19 @@
|
|||
from src import imdb_datasets_worker
|
||||
import requests
|
||||
|
||||
|
||||
def download_imdb_datasets():
|
||||
print('Downloading title.basics.tsv.gz ...')
|
||||
r = requests.get('https://datasets.imdbws.com/title.basics.tsv.gz')
|
||||
with open('title.basics.tsv.gz', 'wb') as basics:
|
||||
basics.write(r.content)
|
||||
del r
|
||||
print('Downloading title.akas.tsv.gz ...')
|
||||
r = requests.get('https://datasets.imdbws.com/title.akas.tsv.gz')
|
||||
with open('title.akas.tsv.gz', 'wb') as akas:
|
||||
akas.write(r.content)
|
||||
del r
|
||||
|
||||
|
||||
download_imdb_datasets()
|
||||
imdb_datasets_worker.convert_datasets_to_db()
|
Loading…
Reference in New Issue
Block a user