Merge pull request #16 from fin-tic/dev

v1.3.3
This commit is contained in:
Justin 2023-03-05 18:11:46 +08:00 committed by GitHub
commit ef3820d820
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
285 changed files with 389 additions and 124 deletions

View File

@ -38,3 +38,5 @@ Seattle Sounders FC,134149,SEA,Green,Seattle.png
Sporting Kansas City,134143,KC,Blue,Kansas-City.png
Toronto FC,134148,TOR,Red,Toronto.png
Vancouver Whitecaps,134147,VAN,Blue,Vancouver.png
St. Louis City SC,147062,STL,Red,St-Louis.png
St. Louis CITY SC,147062,STL,Red,St-Louis.png

1 Full Team Name Team ID 3 Letter ID Team Color Logo File name
38 Sporting Kansas City 134143 KC Blue Kansas-City.png
39 Toronto FC 134148 TOR Red Toronto.png
40 Vancouver Whitecaps 134147 VAN Blue Vancouver.png
41 St. Louis City SC 147062 STL Red St-Louis.png
42 St. Louis CITY SC 147062 STL Red St-Louis.png

View File

@ -158,7 +158,16 @@ def updateCommodities(api_key, logf):
#logf.write('\n ' + "".join(traceback.format_exception(sys.exc_info()[0], sys.exc_info()[1], sys.exc_info()[2])))
#logf.close()
def human_format(num):
num = float('{:.3g}'.format(num))
magnitude = 0
while abs(num) >= 1000:
magnitude += 1
num /= 1000.0
return '{}{}'.format('{:f}'.format(num).rstrip('0').rstrip('.'), ['', 'K', 'M', 'B', 'T'][magnitude])
def updateMovies(api_key, logf):
f = open('csv/movie_settings.json', 'r')
@ -198,6 +207,18 @@ def updateMovies(api_key, logf):
movies = data['results']
for movie in movies:
if movie['media_type'] == 'movie':
movie_id = movie['id']
box_office_url = 'https://api.themoviedb.org/3/movie/' + str(movie_id) + '?api_key=' + api_key
box_office_response = requests.get(box_office_url)
box_office_data = box_office_response.json()
budget = human_format(box_office_data['budget'])
revenue = human_format(box_office_data['revenue'])
else:
budget = '0'
revenue = '0'
movie_language = movie['original_language']
movie_votes = movie['vote_average']
movie_votes = "{:.1f}".format(movie_votes)
@ -248,13 +269,17 @@ def updateMovies(api_key, logf):
'date':movie_date,
'media_type':movie_type.capitalize(),
'genre':genrefinal,
'budget':budget,
'revenue':revenue,
'backdrop':movie['backdrop_path'][1:],
'logo': movie_logo
})
logo_files.append(movie['backdrop_path'][1:])
urllib.request.urlretrieve(movie_logo,'logos/movies/' + movie['backdrop_path'])
if movie['backdrop_path'][1:] not in os.listdir('logos/movies/'):
urllib.request.urlretrieve(movie_logo,'logos/movies/' + movie['backdrop_path'])
time.sleep(0.5)
for file in os.listdir('logos/movies/'):
if file not in logo_files:

BIN
feature_titles/earnings.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 495 B

BIN
logos/earnings/2-star.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 148 B

BIN
logos/earnings/3-star.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 152 B

BIN
logos/earnings/4-star.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 150 B

BIN
logos/earnings/5-star.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 150 B

BIN
logos/earnings/star.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 143 B

BIN
logos/news_logos/1news.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

BIN
logos/news_logos/7news.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

BIN
logos/news_logos/bbc.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 890 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1005 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

BIN
logos/news_logos/cbc.ca.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 357 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.9 KiB

BIN
logos/news_logos/cp24.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 830 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

BIN
logos/news_logos/elle.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 993 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 966 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

BIN
logos/news_logos/gma.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

BIN
logos/news_logos/health.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 417 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 574 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 708 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

BIN
logos/news_logos/ksnb.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

BIN
logos/news_logos/kut.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 883 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

BIN
logos/news_logos/msnnow.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

BIN
logos/news_logos/mtv.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

BIN
logos/news_logos/ndtv.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

BIN
logos/news_logos/nme.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 915 B

BIN
logos/news_logos/pcmag.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 754 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

BIN
logos/news_logos/rnz.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

BIN
logos/news_logos/rte.ie.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 239 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

BIN
logos/news_logos/stuff.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 837 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 837 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 909 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 814 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Some files were not shown because too many files have changed in this diff Show More