diff options
author | Jouke Waleson <jouke.waleson@mendix.com> | 2014-11-23 20:41:03 +0100 |
---|---|---|
committer | Jouke Waleson <jouke.waleson@mendix.com> | 2014-11-23 20:41:03 +0100 |
commit | 5f6a1245ffa9276c1af59b0835afeef67e2fb5b1 (patch) | |
tree | 139c6ede405cf3898e4639f0bf13d32d140fa5f1 /youtube_dl/extractor/appletrailers.py | |
parent | 598c218f7b5c3e78f98dad40f45646c0c9ec773e (diff) |
PEP8 applied
Diffstat (limited to 'youtube_dl/extractor/appletrailers.py')
-rw-r--r-- | youtube_dl/extractor/appletrailers.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/youtube_dl/extractor/appletrailers.py b/youtube_dl/extractor/appletrailers.py index 4359b88d1..567a76cf0 100644 --- a/youtube_dl/extractor/appletrailers.py +++ b/youtube_dl/extractor/appletrailers.py @@ -70,11 +70,13 @@ class AppleTrailersIE(InfoExtractor): uploader_id = mobj.group('company') playlist_url = compat_urlparse.urljoin(url, 'includes/playlists/itunes.inc') + def fix_html(s): s = re.sub(r'(?s)<script[^<]*?>.*?</script>', '', s) s = re.sub(r'<img ([^<]*?)>', r'<img \1/>', s) # The ' in the onClick attributes are not escaped, it couldn't be parsed # like: http://trailers.apple.com/trailers/wb/gravity/ + def _clean_json(m): return 'iTunes.playURL(%s);' % m.group(1).replace('\'', ''') s = re.sub(self._JSON_RE, _clean_json, s) |