MammaMia-Urlo commited on
Commit
d295592
·
verified ·
1 Parent(s): 6b751ab

Delete convert.py

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