Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions GUI.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ def search(self):
"""
This function initiates a new search based on the text entered in the search bar.
"""
self.b1=Button(self, text='Search', command=self.search)
search_string = self.search_var.get()
print(search_string)
self.populate_Similar_Songs(search_string)
Expand Down
10 changes: 5 additions & 5 deletions crawler.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,11 @@ def init(base_url):

Example Dictionary:

{'Link': '/watch?v=ZynacUXphI4',
{'Link': 'https://watch?v=ZynacUXphI4',
'UploadDate': '3 months ago',
'Title': 'halsey - bad at love (lyrics)',
'Verified': False,
'Duration': '3:10',
'Duration': '00:03:10',
'Channel': 'hopeless',
'View': '202,583'}
'''
Expand Down Expand Up @@ -156,7 +156,7 @@ def getMetaData(soup, noOfRecords):

#To remove advertisement tags
if len(video.contents) > 1:
s = video.contents[1].span
s = video.contents[0].span
if(s != None):
if(s.has_attr('aria-label')):
continue
Expand All @@ -178,8 +178,8 @@ def getMetaData(soup, noOfRecords):

#String manipulation for time format
time = durationData.contents[0]
time = time.split(' ')[-1]
time = time.split('.')[0]
time = time.split(' ')[0]
time = time.split(' ')[0]
d['Duration'] = time

#Second child of yt-lockup-content division
Expand Down
2 changes: 1 addition & 1 deletion song_finder.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ def getArtists(cursor, search):
#print(row[0])
artists.append(row[0])

return artists
return artists;

def compareArtists(artists, search):
for artist in artists:
Expand Down