tvple extractor

This commit is contained in:
nimeir 2019-03-26 20:32:38 +00:00
parent 8cb10807ed
commit 35dfca43ea
2 changed files with 32 additions and 0 deletions

View File

@ -1222,6 +1222,7 @@ from .tvplay import (
TVPlayHomeIE, TVPlayHomeIE,
) )
from .tvplayer import TVPlayerIE from .tvplayer import TVPlayerIE
from .tvple import TvPleIE
from .tweakers import TweakersIE from .tweakers import TweakersIE
from .twentyfourvideo import TwentyFourVideoIE from .twentyfourvideo import TwentyFourVideoIE
from .twentymin import TwentyMinutenIE from .twentymin import TwentyMinutenIE

View File

@ -0,0 +1,31 @@
# coding: utf-8
from __future__ import unicode_literals
from .common import InfoExtractor
import re
class TvPleIE(InfoExtractor):
_VALID_URL = r'https?://tvple.com/.+'
_TEST = {
'url': 'http://tvple.com/381843',
'info_dict': {
'id': '381843',
'ext': 'mp4',
'title': '티비플 » [팀 달캬] 마더즈 로자리오(Mother`s Rosario) 프로젝트 » 퍼가기',
}
}
def _real_extract(self, url):
video_id = re.findall('\d.+', url)
webpage = self._download_webpage(url, video_id)
title = re.findall(u'<title>(.+)<\/title>', webpage)
api_request_url = re.findall(r'(http:\/\/api\.tvple\.com\/v1.*?)"', webpage)
api_page = self._download_webpage(api_request_url[0], video_id)
urlh = re.findall(r'(http:\/\/media.*?)"', api_page)
return {
'id': video_id[0],
'title': title,
'ext': 'mp4',
'url': urlh[0]
}