Mythus commited on
Commit
066160d
·
verified ·
1 Parent(s): 0b47aae

Delete convert.py

Browse files
Files changed (1) hide show
  1. convert.py +0 -19
convert.py DELETED
@@ -1,19 +0,0 @@
1
- import requests
2
- from tmdbv3api import TMDb, Movie, TV
3
- from loadenv import load_env
4
- import config
5
- MYSTERIUS = config.MYSTERIUS
6
- if MYSTERIUS == "1":
7
- TMDB_KEY,_= load_env()
8
- else:
9
- TMDB_KEY= load_env()
10
- def get_TMDb_id_from_IMDb_id(imdb_id):
11
- response = requests.get(f'https://api.themoviedb.org/3/find/{imdb_id}',
12
- params={'external_source': 'imdb_id', 'api_key': f'{TMDB_KEY}'})
13
- tmbda = response.json()
14
- if tmbda['movie_results']:
15
- return tmbda['movie_results'][0]['id']
16
- elif tmbda['tv_results']:
17
- return tmbda['tv_results'][0]['id']
18
- else:
19
- return None