1
0
mirror of https://github.com/vikstrous/pirate-get synced 2025-01-09 09:59:51 +01:00

Another encoding issue

I hope this is the last one.
This commit is contained in:
Rnhmjoj 2014-12-03 20:47:25 +01:00
parent 902d0e3f1d
commit f74835f9ff

View File

@ -445,7 +445,7 @@ def main():
if f.info().get('Content-Encoding') == 'gzip':
f = gzip.GzipFile(fileobj=BytesIO(f.read()))
res = f.read().replace(" ", " ")
res = f.read().decode('utf-8').replace(" ", " ")
files = re.findall(r"<td align=\"left\">\s*([^<]+?)\s*</td><td ali"
r"gn=\"right\">\s*([^<]+?)\s*</tr>", res)
name = re.search("dn=([^\&]*)", mags[int(link)][0])