mirror of
https://github.com/beetbox/beets.git
synced 2025-12-10 10:32:34 +01:00
Merge pull request #1161 from Kraymer/lyrics_hotfixes_musixmatch
Musixmatch hotfixes
This commit is contained in:
commit
f45d6c2364
1 changed files with 6 additions and 3 deletions
|
|
@ -61,7 +61,7 @@ def fetch_url(url):
|
|||
is unreachable.
|
||||
"""
|
||||
try:
|
||||
r = requests.get(url)
|
||||
r = requests.get(url, verify=False)
|
||||
except requests.RequestException as exc:
|
||||
log.debug(u'lyrics request failed: {0}'.format(exc))
|
||||
return
|
||||
|
|
@ -85,8 +85,11 @@ def unescape(text):
|
|||
|
||||
|
||||
def extract_text_between(html, start_marker, end_marker):
|
||||
_, html = html.split(start_marker, 1)
|
||||
html, _ = html.split(end_marker, 1)
|
||||
try:
|
||||
_, html = html.split(start_marker, 1)
|
||||
html, _ = html.split(end_marker, 1)
|
||||
except ValueError:
|
||||
return u''
|
||||
return _scrape_strip_cruft(html, True)
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue