mirror of
https://gitea.phreedom.club/localhost_frssoft/FMN_bot.git
synced 2024-11-23 13:43:01 +00:00
20 lines
583 B
Python
20 lines
583 B
Python
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()
|