mirror of
https://github.com/cooperhammond/irs.git
synced 2024-09-19 22:45:15 +00:00
Added the ability to choose a link from a list of titles and fixed major error from last commit
This commit is contained in:
parent
fd270cb9eb
commit
bbac80d5f0
|
@ -27,8 +27,6 @@ def find_mp3(song, artist,
|
||||||
html_content = urlopen("http://www.youtube.com/results?" + query_string)
|
html_content = urlopen("http://www.youtube.com/results?" + query_string)
|
||||||
search_results = findall(r'href=\"\/watch\?v=(.{11})', html_content.read().decode())
|
search_results = findall(r'href=\"\/watch\?v=(.{11})', html_content.read().decode())
|
||||||
|
|
||||||
no_download_terms = ["full album"]
|
|
||||||
|
|
||||||
in_title = False
|
in_title = False
|
||||||
i = -1
|
i = -1
|
||||||
given_up_score = 0
|
given_up_score = 0
|
||||||
|
@ -48,7 +46,7 @@ def find_mp3(song, artist,
|
||||||
|
|
||||||
for song in song_title:
|
for song in song_title:
|
||||||
song = strip_special_chars(song)
|
song = strip_special_chars(song)
|
||||||
if song in title and any(term in song for term in no_download_terms):
|
if song in title and "full album" not in title:
|
||||||
in_title = True
|
in_title = True
|
||||||
|
|
||||||
print (bc.OKGREEN + "Found youtube link! \n" + bc.ENDC)
|
print (bc.OKGREEN + "Found youtube link! \n" + bc.ENDC)
|
||||||
|
|
2
setup.py
2
setup.py
|
@ -2,7 +2,7 @@ from setuptools import setup
|
||||||
|
|
||||||
setup(
|
setup(
|
||||||
name='irs',
|
name='irs',
|
||||||
version='1.5.9',
|
version='1.5.10',
|
||||||
description='A music downloader that just gets metadata.',
|
description='A music downloader that just gets metadata.',
|
||||||
url='https://github.com/kepoorhampond/irs',
|
url='https://github.com/kepoorhampond/irs',
|
||||||
author='Kepoor Hampond',
|
author='Kepoor Hampond',
|
||||||
|
|
Loading…
Reference in a new issue