mirror of
https://github.com/ytdl-org/youtube-dl
synced 2024-11-03 00:48:00 +09:00
Cleanup for pull request. Both tests still pass, successfully
fetching the video and description.
This commit is contained in:
parent
92a3cd37a6
commit
1ac23b7d8c
@ -48,10 +48,12 @@ class Pac12IE(InfoExtractor):
|
|||||||
video_id = self._match_id(vod_url)
|
video_id = self._match_id(vod_url)
|
||||||
title = self._html_search_regex(r'<title>(.+?)</title>',
|
title = self._html_search_regex(r'<title>(.+?)</title>',
|
||||||
webpage, 'title')
|
webpage, 'title')
|
||||||
description = self._og_search_description(webpage, default=None) \
|
description = self._og_search_description(webpage, default=None)
|
||||||
or self._search_regex(r'"description":"(?P<description>[^"]+)"',
|
if description == None:
|
||||||
webpage, 'description', default="") \
|
d = self._search_regex(r'"description":"(?P<description>[^"]+)"',
|
||||||
.encode('utf-8').decode('unicode_escape')
|
webpage, 'description', default=None)
|
||||||
|
if d != None:
|
||||||
|
description = d.encode('utf-8').decode('unicode_escape')
|
||||||
return {
|
return {
|
||||||
'id': video_id,
|
'id': video_id,
|
||||||
'title': title,
|
'title': title,
|
||||||
|
Loading…
Reference in New Issue
Block a user