mirror of
https://github.com/l1ving/youtube-dl
synced 2020-11-18 19:53:54 -08:00
[yjc] Add new extractor
This commit is contained in:
parent
6a6e1a0cd8
commit
6d6a00c8e5
@ -1449,6 +1449,7 @@ from .yandexvideo import YandexVideoIE
|
|||||||
from .yapfiles import YapFilesIE
|
from .yapfiles import YapFilesIE
|
||||||
from .yesjapan import YesJapanIE
|
from .yesjapan import YesJapanIE
|
||||||
from .yinyuetai import YinYueTaiIE
|
from .yinyuetai import YinYueTaiIE
|
||||||
|
from .yjc import yjcIE
|
||||||
from .ynet import YnetIE
|
from .ynet import YnetIE
|
||||||
from .youjizz import YouJizzIE
|
from .youjizz import YouJizzIE
|
||||||
from .youku import (
|
from .youku import (
|
||||||
|
32
youtube_dl/extractor/yjc.py
Normal file
32
youtube_dl/extractor/yjc.py
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
|
from .common import InfoExtractor
|
||||||
|
|
||||||
|
|
||||||
|
class yjcIE(InfoExtractor):
|
||||||
|
_VALID_URL = r'(?:https?://)?(?:www\.)?yjc\.ir/fa/news/(?P<id>\w+)/*'
|
||||||
|
|
||||||
|
_TESTS = {
|
||||||
|
# TODO: Implement
|
||||||
|
}
|
||||||
|
|
||||||
|
def _real_extract(self, url):
|
||||||
|
video_id = self._match_id(url)
|
||||||
|
|
||||||
|
webpage = self._download_webpage(
|
||||||
|
url, video_id
|
||||||
|
)
|
||||||
|
|
||||||
|
title = self._html_search_regex(r'<title>(.+?)</title>', webpage, 'title')
|
||||||
|
|
||||||
|
download_url = self._html_search_regex(
|
||||||
|
|
||||||
|
r'((https:\/\/)cdn\.yjc\.ir/files/fa/news/[0-9]*/[0-9]*/[0-9]*/[0-9_]*\.mp4)',
|
||||||
|
|
||||||
|
webpage, "download_url"
|
||||||
|
)
|
||||||
|
return {
|
||||||
|
'id': video_id,
|
||||||
|
'url': download_url,
|
||||||
|
'title': title
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user