aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/extractor
diff options
context:
space:
mode:
authorRemita Amine <remitamine@gmail.com>2017-11-25 18:50:15 +0100
committerRemita Amine <remitamine@gmail.com>2017-11-25 18:50:15 +0100
commit87dac57cf69f7a4528c511dc7c1b9a690199cf1e (patch)
tree14d82fceb83c18b3444cdd9a439d3ae7868c8a0a /youtube_dl/extractor
parentb485d5d6bf2052edf6d7218a0e4afa89884f13c6 (diff)
[firstpost] remove extractor
Diffstat (limited to 'youtube_dl/extractor')
-rw-r--r--youtube_dl/extractor/extractors.py1
-rw-r--r--youtube_dl/extractor/firstpost.py50
2 files changed, 0 insertions, 51 deletions
diff --git a/youtube_dl/extractor/extractors.py b/youtube_dl/extractor/extractors.py
index bc1ca0f0a..d3104f393 100644
--- a/youtube_dl/extractor/extractors.py
+++ b/youtube_dl/extractor/extractors.py
@@ -344,7 +344,6 @@ from .filmon import (
FilmOnIE,
FilmOnChannelIE,
)
-from .firstpost import FirstpostIE
from .firsttv import FirstTVIE
from .fivemin import FiveMinIE
from .fivetv import FiveTVIE
diff --git a/youtube_dl/extractor/firstpost.py b/youtube_dl/extractor/firstpost.py
deleted file mode 100644
index e8936cb24..000000000
--- a/youtube_dl/extractor/firstpost.py
+++ /dev/null
@@ -1,50 +0,0 @@
-from __future__ import unicode_literals
-
-from .common import InfoExtractor
-
-
-class FirstpostIE(InfoExtractor):
- _VALID_URL = r'https?://(?:www\.)?firstpost\.com/[^/]+/.*-(?P<id>[0-9]+)\.html'
-
- _TEST = {
- 'url': 'http://www.firstpost.com/india/india-to-launch-indigenous-aircraft-carrier-monday-1025403.html',
- 'md5': 'ee9114957692f01fb1263ed87039112a',
- 'info_dict': {
- 'id': '1025403',
- 'ext': 'mp4',
- 'title': 'India to launch indigenous aircraft carrier INS Vikrant today',
- 'description': 'md5:feef3041cb09724e0bdc02843348f5f4',
- }
- }
-
- def _real_extract(self, url):
- video_id = self._match_id(url)
- page = self._download_webpage(url, video_id)
-
- title = self._html_search_meta('twitter:title', page, 'title', fatal=True)
- description = self._html_search_meta('twitter:description', page, 'title')
-
- data = self._download_xml(
- 'http://www.firstpost.com/getvideoxml-%s.xml' % video_id, video_id,
- 'Downloading video XML')
-
- item = data.find('./playlist/item')
- thumbnail = item.find('./image').text
-
- formats = [
- {
- 'url': details.find('./file').text,
- 'format_id': details.find('./label').text.strip(),
- 'width': int(details.find('./width').text.strip()),
- 'height': int(details.find('./height').text.strip()),
- } for details in item.findall('./source/file_details') if details.find('./file').text
- ]
- self._sort_formats(formats)
-
- return {
- 'id': video_id,
- 'title': title,
- 'description': description,
- 'thumbnail': thumbnail,
- 'formats': formats,
- }