Python 2 compat fixes for MyVideo.de rtmpdump downloads

This commit is contained in:
Filippo Valsorda 2013-05-20 11:57:10 +02:00
parent f008688520
commit b31756c18e
2 changed files with 22 additions and 20 deletions

View file

@ -150,6 +150,10 @@ try:
except NameError:
compat_chr = chr
def compat_ord(c):
if type(c) is int: return c
else: return ord(c)
std_headers = {
'User-Agent': 'Mozilla/5.0 (X11; Linux x86_64; rv:10.0) Gecko/20100101 Firefox/10.0',
'Accept-Charset': 'ISO-8859-1,utf-8;q=0.7,*;q=0.7',