1
0
mirror of https://github.com/l1ving/youtube-dl synced 2025-03-13 10:17:15 +08:00

[npo] Add www.2doc.nl (formarly www.hollanddoc.nl) support to existing npo extractor

This commit is contained in:
Pim Borman 2016-10-03 23:15:52 +02:00
parent 7232e54813
commit 377b9d2aca
2 changed files with 27 additions and 0 deletions

View File

@ -622,6 +622,7 @@ from .npo import (
SchoolTVIE,
VPROIE,
WNLIE,
TweeDocIE,
)
from .npr import NprIE
from .nrk import (

View File

@ -526,3 +526,29 @@ class AndereTijdenIE(NPOPlaylistBaseIE):
},
'playlist_count': 3,
}]
class TweeDocIE(NPOPlaylistBaseIE):
IE_NAME = 'tweedoc'
_VALID_URL = 'https?://(?:www\.)2doc\.nl[^.]*/(?P<id>[^/]+)\.html'
_PLAYLIST_TITLE_RE = r'(?s)<h1[^>]+class=["\'].*?\bpage-title\b.*?["\'][^>]*>(.+?)</h1>'
_PLAYLIST_ENTRY_RE = r'data-media-id="([^"]+)"'
_TESTS = [
{
'url': 'http://www.2doc.nl/documentaires/series/2doc/2015/oktober/de-tegenprestatie.html',
'info_dict': {
'id': 'de-tegenprestatie',
'title': 'De Tegenprestatie - De Tegenprestatie - 2Doc:',
},
'playlist_count': 2,
},
{
'url': 'http://www.2doc.nl/speel~VARA_101375237~mh17-het-verdriet-van-nederland~.html',
'info_dict': {
'id': 'speel~VARA_101375237~mh17-het-verdriet-van-nederland~',
'title': 'Speel - - MH17: Het verdriet van Nederland',
},
'playlist_count': 1,
},
]