mirror of
https://github.com/l1ving/youtube-dl
synced 2020-11-18 19:53:54 -08:00
[servushockeynight.com] Add new extractor
This commit is contained in:
parent
532782ade1
commit
d6b9e85f5c
@ -983,6 +983,7 @@ from .senateisvp import SenateISVPIE
|
|||||||
from .sendtonews import SendtoNewsIE
|
from .sendtonews import SendtoNewsIE
|
||||||
from .servingsys import ServingSysIE
|
from .servingsys import ServingSysIE
|
||||||
from .servus import ServusIE
|
from .servus import ServusIE
|
||||||
|
from .servushockeynight import servushockeynightIE
|
||||||
from .sevenplus import SevenPlusIE
|
from .sevenplus import SevenPlusIE
|
||||||
from .sexu import SexuIE
|
from .sexu import SexuIE
|
||||||
from .seznamzpravy import (
|
from .seznamzpravy import (
|
||||||
|
35
youtube_dl/extractor/servushockeynight.py
Normal file
35
youtube_dl/extractor/servushockeynight.py
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
# coding: utf-8
|
||||||
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
|
from .common import InfoExtractor
|
||||||
|
|
||||||
|
|
||||||
|
class servushockeynightIE(InfoExtractor):
|
||||||
|
_VALID_URL = r'http?://(?:www\.)?servushockeynight\.com/(?P<id>[0-9]+)'
|
||||||
|
_TEST = {
|
||||||
|
'url': 'http://servushockeynight.com/videos/runde-17-graz-vs-kac-das-ganze-spiel-zum-nachsehen/',
|
||||||
|
'md5': '7ff5e10e45e08062fb94270b88a39948',
|
||||||
|
'info_dict': {
|
||||||
|
'id': '5857499729001',
|
||||||
|
'ext': 'mp4',
|
||||||
|
'title': 'Runde 17: Graz vs. Klagenfurt // Saison 18/19 - Ganzes Spiel',
|
||||||
|
'timestamp': 1541359757,
|
||||||
|
'uploader_id': '3213846503001',
|
||||||
|
'upload_date': '20181104',
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
def _real_extract(self, url):
|
||||||
|
video_id = self._match_id(url)
|
||||||
|
webpage = self._download_webpage(url, video_id)
|
||||||
|
|
||||||
|
title = self._html_search_regex(r'<h1>(.+?)</h1>', webpage, 'title')
|
||||||
|
description = self._og_search_description(webpage)
|
||||||
|
thumbnail = self._og_search_thumbnail(webpage)
|
||||||
|
|
||||||
|
return {
|
||||||
|
'id': video_id,
|
||||||
|
'title': title,
|
||||||
|
'description': self._og_search_description(webpage),
|
||||||
|
'uploader': self._search_regex(r'<div[^>]+id="uploader"[^>]*>([^<]+)<', webpage, 'uploader', fatal=False),
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user