py3 fixes

This commit is contained in:
j 2016-09-19 10:30:56 +02:00
parent 7cda751666
commit 70710d8446

View file

@ -82,12 +82,12 @@ def get_ids(page=None):
ids = [] ids = []
if page: if page:
url = "http://www.criterion.com/library/expanded_view?m=dvd&p=%s&pp=50&s=spine" % page url = "http://www.criterion.com/library/expanded_view?m=dvd&p=%s&pp=50&s=spine" % page
html = read_url(url) html = read_url(url, unicode=True)
results = re.compile("films/(\d+)").findall(html) results = re.compile("films/(\d+)").findall(html)
ids += results ids += results
results = re.compile("boxsets/(.*?)\"").findall(html) results = re.compile("boxsets/(.*?)\"").findall(html)
for result in results: for result in results:
html = read_url("http://www.criterion.com/boxsets/" + result) html = read_url("http://www.criterion.com/boxsets/" + result, unicode=True)
results = re.compile("films/(\d+)").findall(html) results = re.compile("films/(\d+)").findall(html)
ids += results ids += results
return set(ids) return set(ids)