aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Seiler <seileralex@gmail.com>2017-10-19 17:17:20 +0200
committerSergey M <dstftw@gmail.com>2017-10-19 22:17:20 +0700
commite1d168e59243e740b83b02dd4f5b7b28c60ef7d3 (patch)
treefb0899c77beeb285b4a3c48e9ff5c76c598f7b12
parentca1c9f26fa8277c0ea75c1d91a74f454cc9aaac5 (diff)
downloadyoutube-dl-e1d168e59243e740b83b02dd4f5b7b28c60ef7d3.tar.xz
[servus] Add extractor (closes #14362)
-rw-r--r--youtube_dl/extractor/extractors.py1
-rw-r--r--youtube_dl/extractor/servus.py43
2 files changed, 44 insertions, 0 deletions
diff --git a/youtube_dl/extractor/extractors.py b/youtube_dl/extractor/extractors.py
index 1624129d2..09b20a39a 100644
--- a/youtube_dl/extractor/extractors.py
+++ b/youtube_dl/extractor/extractors.py
@@ -925,6 +925,7 @@ from .seeker import SeekerIE
from .senateisvp import SenateISVPIE
from .sendtonews import SendtoNewsIE
from .servingsys import ServingSysIE
+from .servus import ServusIE
from .sexu import SexuIE
from .shahid import ShahidIE
from .shared import (
diff --git a/youtube_dl/extractor/servus.py b/youtube_dl/extractor/servus.py
new file mode 100644
index 000000000..264e1dd8b
--- /dev/null
+++ b/youtube_dl/extractor/servus.py
@@ -0,0 +1,43 @@
+# coding: utf-8
+from __future__ import unicode_literals
+
+from .common import InfoExtractor
+
+
+class ServusIE(InfoExtractor):
+ _VALID_URL = r'https?://(?:www\.)?servus\.com/(?:at|de)/p/[^/]+/(?P<id>AA-\w+|\d+-\d+)'
+ _TESTS = [{
+ 'url': 'https://www.servus.com/de/p/Die-Gr%C3%BCnen-aus-Sicht-des-Volkes/AA-1T6VBU5PW1W12/',
+ 'md5': '046dee641cda1c4cabe13baef3be2c1c',
+ 'info_dict': {
+ 'id': 'AA-1T6VBU5PW1W12',
+ 'ext': 'mp4',
+ 'title': 'Die GrĂ¼nen aus Volkssicht',
+ 'description': 'md5:052b5da1cb2cd7d562ef1f19be5a5cba',
+ 'thumbnail': r're:^https?://.*\.jpg$',
+ }
+ }, {
+ 'url': 'https://www.servus.com/at/p/Wie-das-Leben-beginnt/1309984137314-381415152/',
+ 'only_matching': True,
+ }]
+
+ def _real_extract(self, url):
+ video_id = self._match_id(url)
+ webpage = self._download_webpage(url, video_id)
+
+ title = self._og_search_title(webpage)
+ description = self._og_search_description(webpage)
+ thumbnail = self._og_search_thumbnail(webpage)
+
+ formats = self._extract_m3u8_formats(
+ 'https://stv.rbmbtnx.net/api/v1/manifests/%s.m3u8' % video_id,
+ video_id, 'mp4', entry_protocol='m3u8_native', m3u8_id='hls')
+ self._sort_formats(formats)
+
+ return {
+ 'id': video_id,
+ 'title': title,
+ 'description': description,
+ 'thumbnail': thumbnail,
+ 'formats': formats,
+ }