projects
/
youtube-dl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
8f6f40d
)
Fix XNXX in Python 3
author
Philipp Hagemeister
<phihag@phihag.de>
Sat, 15 Dec 2012 17:19:25 +0000
(18:19 +0100)
committer
Philipp Hagemeister
<phihag@phihag.de>
Sat, 15 Dec 2012 17:19:25 +0000
(18:19 +0100)
youtube_dl/InfoExtractors.py
patch
|
blob
|
history
diff --git
a/youtube_dl/InfoExtractors.py
b/youtube_dl/InfoExtractors.py
index b1ede697a7bedd5260072450f57a8939988c8e28..637b14bc08ed2a9c56a04b0b5cae821df8630dce 100644
(file)
--- a/
youtube_dl/InfoExtractors.py
+++ b/
youtube_dl/InfoExtractors.py
@@
-3424,13
+3424,14
@@
class XNXXIE(InfoExtractor):
if mobj is None:
self._downloader.trouble(u'ERROR: invalid URL: %s' % url)
return
if mobj is None:
self._downloader.trouble(u'ERROR: invalid URL: %s' % url)
return
- video_id = mobj.group(1)
.decode('utf-8')
+ video_id = mobj.group(1)
self.report_webpage(video_id)
# Get webpage content
try:
self.report_webpage(video_id)
# Get webpage content
try:
- webpage = compat_urllib_request.urlopen(url).read()
+ webpage_bytes = compat_urllib_request.urlopen(url).read()
+ webpage = webpage_bytes.decode('utf-8')
except (compat_urllib_error.URLError, compat_http_client.HTTPException, socket.error) as err:
self._downloader.trouble(u'ERROR: unable to download video webpage: %s' % err)
return
except (compat_urllib_error.URLError, compat_http_client.HTTPException, socket.error) as err:
self._downloader.trouble(u'ERROR: unable to download video webpage: %s' % err)
return
@@
-3439,19
+3440,19
@@
class XNXXIE(InfoExtractor):
if result is None:
self._downloader.trouble(u'ERROR: unable to extract video url')
return
if result is None:
self._downloader.trouble(u'ERROR: unable to extract video url')
return
- video_url = compat_urllib_parse.unquote(result.group(1)
.decode('utf-8')
)
+ video_url = compat_urllib_parse.unquote(result.group(1))
result = re.search(self.VIDEO_TITLE_RE, webpage)
if result is None:
self._downloader.trouble(u'ERROR: unable to extract video title')
return
result = re.search(self.VIDEO_TITLE_RE, webpage)
if result is None:
self._downloader.trouble(u'ERROR: unable to extract video title')
return
- video_title = result.group(1)
.decode('utf-8')
+ video_title = result.group(1)
result = re.search(self.VIDEO_THUMB_RE, webpage)
if result is None:
self._downloader.trouble(u'ERROR: unable to extract video thumbnail')
return
result = re.search(self.VIDEO_THUMB_RE, webpage)
if result is None:
self._downloader.trouble(u'ERROR: unable to extract video thumbnail')
return
- video_thumbnail = result.group(1)
.decode('utf-8')
+ video_thumbnail = result.group(1)
return [{
'id': video_id,
return [{
'id': video_id,