mirror of
https://gitea.phreedom.club/localhost_frssoft/FMN_bot
synced 2024-11-23 14:09:20 +02:00
Display datasets date
This commit is contained in:
parent
b23114d1be
commit
012841dda2
|
@ -4,12 +4,16 @@ import requests
|
||||||
|
|
||||||
def download_imdb_datasets():
|
def download_imdb_datasets():
|
||||||
print('Downloading title.basics.tsv.gz ...')
|
print('Downloading title.basics.tsv.gz ...')
|
||||||
r = requests.get('https://datasets.imdbws.com/title.basics.tsv.gz')
|
r = requests.get('https://datasets.imdbws.com/title.basics.tsv.gz')
|
||||||
|
last_update = r.headers['Last-Modified']
|
||||||
|
print(f'Dataset date: {last_update}')
|
||||||
with open('title.basics.tsv.gz', 'wb') as basics:
|
with open('title.basics.tsv.gz', 'wb') as basics:
|
||||||
basics.write(r.content)
|
basics.write(r.content)
|
||||||
del r
|
del r
|
||||||
print('Downloading title.akas.tsv.gz ...')
|
print('Downloading title.akas.tsv.gz ...')
|
||||||
r = requests.get('https://datasets.imdbws.com/title.akas.tsv.gz')
|
r = requests.get('https://datasets.imdbws.com/title.akas.tsv.gz')
|
||||||
|
last_update = r.headers['Last-Modified']
|
||||||
|
print(f'Dataset date: {last_update}')
|
||||||
with open('title.akas.tsv.gz', 'wb') as akas:
|
with open('title.akas.tsv.gz', 'wb') as akas:
|
||||||
akas.write(r.content)
|
akas.write(r.content)
|
||||||
del r
|
del r
|
||||||
|
|
Loading…
Reference in New Issue