[gfycat] Support embeds (#2229)

Closes #2214
Authored by: coletdjnz
This commit is contained in:
coletdjnz
2022-01-05 08:39:24 +00:00
committed by GitHub
parent b8eeced286
commit 9f517bb1f3
2 changed files with 46 additions and 1 deletions

View File

@@ -137,6 +137,7 @@ from .simplecast import SimplecastIE
from .wimtv import WimTVIE
from .tvp import TVPEmbedIE
from .blogger import BloggerIE
from .gfycat import GfycatIE
class GenericIE(InfoExtractor):
@@ -2382,6 +2383,33 @@ class GenericIE(InfoExtractor):
'timestamp': 1636788683.0,
'upload_date': '20211113'
}
},
{
# Multiple gfycat iframe embeds
'url': 'https://www.gezip.net/bbs/board.php?bo_table=entertaine&wr_id=613422',
'info_dict': {
'title': '재이, 윤, 세은 황금 드레스를 입고 빛난다',
'id': 'board'
},
'playlist_count': 8,
},
{
# Multiple gfycat gifs (direct links)
'url': 'https://www.gezip.net/bbs/board.php?bo_table=entertaine&wr_id=612199',
'info_dict': {
'title': '옳게 된 크롭 니트 스테이씨 아이사',
'id': 'board'
},
'playlist_count': 6
},
{
# Multiple gfycat embeds, with uppercase "IFR" in urls
'url': 'https://kkzz.kr/?vid=2295',
'info_dict': {
'title': '지방시 앰버서더 에스파 카리나 움짤',
'id': '?vid=2295'
},
'playlist_count': 9
}
#
]
@@ -3572,6 +3600,10 @@ class GenericIE(InfoExtractor):
if tvp_urls:
return self.playlist_from_matches(tvp_urls, video_id, video_title, ie=TVPEmbedIE.ie_key())
# Look for Gfycat Embeds
gfycat_urls = GfycatIE._extract_urls(webpage)
if gfycat_urls:
return self.playlist_from_matches(gfycat_urls, video_id, video_title, ie=GfycatIE.ie_key())
# Look for HTML5 media
entries = self._parse_html5_media_entries(url, webpage, video_id, m3u8_id='hls')
if entries: