another criterion fix

This commit is contained in:
j 2018-05-07 09:48:14 +01:00
parent 758acfe01b
commit 228ec9dbd2

View file

@ -34,7 +34,7 @@ def get_data(id, timeout=ox.cache.cache_timeout, get_imdb=False):
html = read_url(data["url"], timeout=timeout, unicode=True) html = read_url(data["url"], timeout=timeout, unicode=True)
except: except:
html = ox.cache.read_url(data["url"], timeout=timeout) html = ox.cache.read_url(data["url"], timeout=timeout)
data["number"] = find_re(html, "<li>Spine #(\d+)") data["number"] = find_re(html, "<b>Spine #(\d+)")
data["title"] = decode_html(find_re(html, "<h1 class=\"header__primarytitle\".*?>(.*?)</h1>")) data["title"] = decode_html(find_re(html, "<h1 class=\"header__primarytitle\".*?>(.*?)</h1>"))
data["title"] = data["title"].split(u' \u2014 The Television Version')[0].strip() data["title"] = data["title"].split(u' \u2014 The Television Version')[0].strip()