diff options
author | Unknown <blackjack4494@web.de> | 2020-09-02 20:25:25 +0200 |
---|---|---|
committer | Unknown <blackjack4494@web.de> | 2020-09-02 20:25:25 +0200 |
commit | cefecac12cd3c70f9c7a30992c60b05c2eb5d34e (patch) | |
tree | f7b8e3f8ca2f6e402c83a501f72c09854ae04887 /youtube_dl/extractor/crooksandliars.py | |
parent | 9688f237163b6aa546fde00bb3fd1e3445dd4c31 (diff) | |
download | hypervideo-pre-cefecac12cd3c70f9c7a30992c60b05c2eb5d34e.tar.lz hypervideo-pre-cefecac12cd3c70f9c7a30992c60b05c2eb5d34e.tar.xz hypervideo-pre-cefecac12cd3c70f9c7a30992c60b05c2eb5d34e.zip |
[skip travis] renaming
to avoid using same folder when using pip install for example
Diffstat (limited to 'youtube_dl/extractor/crooksandliars.py')
-rw-r--r-- | youtube_dl/extractor/crooksandliars.py | 60 |
1 files changed, 0 insertions, 60 deletions
diff --git a/youtube_dl/extractor/crooksandliars.py b/youtube_dl/extractor/crooksandliars.py deleted file mode 100644 index 7fb782db7..000000000 --- a/youtube_dl/extractor/crooksandliars.py +++ /dev/null @@ -1,60 +0,0 @@ -from __future__ import unicode_literals - -from .common import InfoExtractor -from ..utils import ( - int_or_none, - qualities, -) - - -class CrooksAndLiarsIE(InfoExtractor): - _VALID_URL = r'https?://embed\.crooksandliars\.com/(?:embed|v)/(?P<id>[A-Za-z0-9]+)' - _TESTS = [{ - 'url': 'https://embed.crooksandliars.com/embed/8RUoRhRi', - 'info_dict': { - 'id': '8RUoRhRi', - 'ext': 'mp4', - 'title': 'Fox & Friends Says Protecting Atheists From Discrimination Is Anti-Christian!', - 'description': 'md5:e1a46ad1650e3a5ec7196d432799127f', - 'thumbnail': r're:^https?://.*\.jpg', - 'timestamp': 1428207000, - 'upload_date': '20150405', - 'uploader': 'Heather', - 'duration': 236, - } - }, { - 'url': 'http://embed.crooksandliars.com/v/MTE3MjUtMzQ2MzA', - 'only_matching': True, - }] - - def _real_extract(self, url): - video_id = self._match_id(url) - - webpage = self._download_webpage( - 'http://embed.crooksandliars.com/embed/%s' % video_id, video_id) - - manifest = self._parse_json( - self._search_regex( - r'var\s+manifest\s*=\s*({.+?})\n', webpage, 'manifest JSON'), - video_id) - - quality = qualities(('webm_low', 'mp4_low', 'webm_high', 'mp4_high')) - - formats = [{ - 'url': item['url'], - 'format_id': item['type'], - 'quality': quality(item['type']), - } for item in manifest['flavors'] if item['mime'].startswith('video/')] - self._sort_formats(formats) - - return { - 'url': url, - 'id': video_id, - 'title': manifest['title'], - 'description': manifest.get('description'), - 'thumbnail': self._proto_relative_url(manifest.get('poster')), - 'timestamp': int_or_none(manifest.get('created')), - 'uploader': manifest.get('author'), - 'duration': int_or_none(manifest.get('duration')), - 'formats': formats, - } |