-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
76a5036
commit c9f6b99
Showing
3 changed files
with
132 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
import datetime | ||
import os.path | ||
import pprint | ||
import time | ||
|
||
from search_on_itunes import search_on_itunes_v2 | ||
import pandas | ||
|
||
pandas.options.display.max_rows = None | ||
pandas.options.display.max_columns = None | ||
pandas.options.display.width = 6000 | ||
pandas.options.display.max_colwidth = 6000 | ||
pandas.options.display.colheader_justify = 'left' | ||
|
||
df = pandas.read_excel(os.path.join(os.getcwd(), 'merged.xlsx'), sheet_name='Sheet1', index_col=0) | ||
|
||
for _, col in df.iterrows(): | ||
url, artist_name, release_name, release_type, release_date, record_label, song_name, length, lyrics, composition, arrangement = col | ||
print(artist_name) | ||
print(release_name) | ||
print(song_name) | ||
print(int(str(length).split(':')[0]) * 60 + int(str(length).split(':')[1])) | ||
print(datetime.datetime.strptime(release_date, '%Y/%m/%d').date()) | ||
print('\n\n\n') | ||
response = search_on_itunes_v2(artist_name=artist_name, album_name=release_name, song_name=song_name, | ||
released_date=datetime.datetime.strptime(release_date, '%Y/%m/%d').date(), | ||
length=int(str(length).split(':')[0]) * 60 + int(str(length).split(':')[1]), | ||
debug=False) | ||
pprint.pprint(response) | ||
# time.sleep(1) | ||
|
||
# time.sleep(0.3) | ||
|
||
# search_result = search_on_itunes(search_keyword=song_name, artist_keyword=artist_name, debug=True) | ||
# # pprint.pprint(search_result) | ||
# album_name, _, itunes_song_name, _, itunes_artist_name, _, itunes_page, artwork_url, google_link, json_data, album_json = search_result | ||
# print(album_name) | ||
# print(itunes_song_name) | ||
# print(itunes_artist_name) | ||
# print(itunes_page) | ||
# print(artwork_url) | ||
# print('\n\n\n\n\n') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters