projects
/
youtube-dl
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix "invalid escape sequences" error on Python 3.6
[youtube-dl]
/
youtube_dl
/
extractor
/
adobetv.py
diff --git
a/youtube_dl/extractor/adobetv.py
b/youtube_dl/extractor/adobetv.py
index d658269323800f5ee925d3e330e87b37b4e07413..008c98e51ead3ffcad7bb350fcf928a945b91e35 100644
(file)
--- a/
youtube_dl/extractor/adobetv.py
+++ b/
youtube_dl/extractor/adobetv.py
@@
-3,6
+3,7
@@
from __future__ import unicode_literals
import re
from .common import InfoExtractor
import re
from .common import InfoExtractor
+from ..compat import compat_str
from ..utils import (
parse_duration,
unified_strdate,
from ..utils import (
parse_duration,
unified_strdate,
@@
-29,7
+30,7
@@
class AdobeTVIE(AdobeTVBaseIE):
'ext': 'mp4',
'title': 'Quick Tip - How to Draw a Circle Around an Object in Photoshop',
'description': 'md5:99ec318dc909d7ba2a1f2b038f7d2311',
'ext': 'mp4',
'title': 'Quick Tip - How to Draw a Circle Around an Object in Photoshop',
'description': 'md5:99ec318dc909d7ba2a1f2b038f7d2311',
- 'thumbnail': 're:https?://.*\.jpg$',
+ 'thumbnail':
r
're:https?://.*\.jpg$',
'upload_date': '20110914',
'duration': 60,
'view_count': int,
'upload_date': '20110914',
'duration': 60,
'view_count': int,
@@
-55,7
+56,7
@@
class AdobeTVIE(AdobeTVBaseIE):
self._sort_formats(formats)
return {
self._sort_formats(formats)
return {
- 'id': str(video_data['id']),
+ 'id':
compat_
str(video_data['id']),
'title': video_data['title'],
'description': video_data.get('description'),
'thumbnail': video_data.get('thumbnail'),
'title': video_data['title'],
'description': video_data.get('description'),
'thumbnail': video_data.get('thumbnail'),
@@
-105,7
+106,7
@@
class AdobeTVShowIE(AdobeTVPlaylistBaseIE):
return self.playlist_result(
self._extract_playlist_entries(self._API_BASE_URL + 'episode/?%s' % query, show_urlname),
return self.playlist_result(
self._extract_playlist_entries(self._API_BASE_URL + 'episode/?%s' % query, show_urlname),
- str(show_data['id']),
+
compat_
str(show_data['id']),
show_data['show_name'],
show_data['show_description'])
show_data['show_name'],
show_data['show_description'])
@@
-155,7
+156,10
@@
class AdobeTVVideoIE(InfoExtractor):
def _real_extract(self, url):
video_id = self._match_id(url)
def _real_extract(self, url):
video_id = self._match_id(url)
- video_data = self._download_json(url + '?format=json', video_id)
+ webpage = self._download_webpage(url, video_id)
+
+ video_data = self._parse_json(self._search_regex(
+ r'var\s+bridge\s*=\s*([^;]+);', webpage, 'bridged data'), video_id)
formats = [{
'format_id': '%s-%s' % (determine_ext(source['src']), source.get('height')),
formats = [{
'format_id': '%s-%s' % (determine_ext(source['src']), source.get('height')),