1
0
Fork 0
mirror of https://github.com/ytdl-org/youtube-dl.git synced 2024-11-29 13:42:37 +00:00

[TasVideos] Add new extractor

This commit is contained in:
SpiderRiderGit 2020-12-25 12:59:26 -05:00
parent 08a17dae5b
commit b67b441108
2 changed files with 33 additions and 0 deletions

View file

@ -1128,6 +1128,7 @@ from .tagesschau import (
TagesschauIE, TagesschauIE,
) )
from .tass import TassIE from .tass import TassIE
from .tasvideos import TasVideosIE
from .tbs import TBSIE from .tbs import TBSIE
from .tdslifeway import TDSLifewayIE from .tdslifeway import TDSLifewayIE
from .teachable import ( from .teachable import (

View file

@ -0,0 +1,32 @@
from __future__ import unicode_literals
from .common import InfoExtractor
class TasVideosIE(InfoExtractor):
_VALID_URL = r'http://tasvideos.org/(?P<id>\d+M)\.html'
_TEST = {
'url': 'http://tasvideos.org/4352M.html',
'md5': '92b08f544beb6ee905030609c7251cd1',
'info_dict': {
'id': '4352M',
'ext': 'mkv',
'title': 'C64 L\'Abbaye des Morts',
}
}
def _real_extract(self, url):
video_id = self._match_id(url)
webpage = self._download_webpage(url, video_id)
video_url = "http://www." + self._search_regex(
r'<a [^>]+(?P<URL>archive\.org\/download[^<]+(?:mkv|mp4))[^<]+<\/a>',
webpage, 'video url')
title = self._search_regex(
r'<span title="Movie[^"]+">(?P<TITLE>[^<]+)<\/span>', webpage,
'title')
return {
'id': video_id,
'title': title,
'url': video_url,
}