criterion

This commit is contained in:
j 2011-02-27 16:33:25 +01:00
parent 337fb29685
commit 15db38b442

View file

@ -33,9 +33,10 @@ def getData(id):
html = readUrlUnicode(data["url"]) html = readUrlUnicode(data["url"])
except: except:
html = ox.cache.readUrl(data["url"]) html = ox.cache.readUrl(data["url"])
data["number"] = findRe(html, "<p class=\"spinenumber\">(.*?)</p>") data["number"] = findRe(html, "<li>Spine #(\d+)")
data["title"] = findRe(html, "<meta property=['\"]og:title['\"] content=['\"](.*?)['\"]") data["title"] = findRe(html, "<meta property=['\"]og:title['\"] content=['\"](.*?)['\"]")
data["director"] = findRe(html, "<h2 class=\"director\">(.*?)</h2>") data["director"] = stripTags(findRe(html, "<h2 class=\"director\">(.*?)</h2>"))
results = findRe(html, '<div class="left_column">(.*?)</div>') results = findRe(html, '<div class="left_column">(.*?)</div>')
results = re.compile("<li>(.*?)</li>").findall(results) results = re.compile("<li>(.*?)</li>").findall(results)
data["country"] = results[0] data["country"] = results[0]