@ -11,11 +11,11 @@ class OnDemandKoreaIE(InfoExtractor):
_VALID_URL = r ' https?://(?:www \ .)?ondemandkorea \ .com/(?P<id>[^/]+) \ .html '
_VALID_URL = r ' https?://(?:www \ .)?ondemandkorea \ .com/(?P<id>[^/]+) \ .html '
_GEO_COUNTRIES = [ ' US ' , ' CA ' ]
_GEO_COUNTRIES = [ ' US ' , ' CA ' ]
_TESTS = [ {
_TESTS = [ {
' url ' : ' https://www.ondemandkorea.com/ask-us-anything-e 4 3.html' ,
' url ' : ' https://www.ondemandkorea.com/ask-us-anything-e 351 .html' ,
' info_dict ' : {
' info_dict ' : {
' id ' : ' ask-us-anything-e 4 3' ,
' id ' : ' ask-us-anything-e 351 ' ,
' ext ' : ' mp4 ' ,
' ext ' : ' mp4 ' ,
' title ' : ' Ask Us Anything : Gain, Ji Soo - 09/24/2016 ' ,
' title ' : ' Ask Us Anything : Jung Sung-ho, Park Seul-gi, Kim Bo-min, Yang Seung-won - 09/24/2022 ' ,
' description ' : ' A talk show/game show with a school theme where celebrity guests appear as “transfer students.” ' ,
' description ' : ' A talk show/game show with a school theme where celebrity guests appear as “transfer students.” ' ,
' thumbnail ' : r ' re:^https?://.* \ .jpg$ ' ,
' thumbnail ' : r ' re:^https?://.* \ .jpg$ ' ,
} ,
} ,
@ -23,13 +23,13 @@ class OnDemandKoreaIE(InfoExtractor):
' skip_download ' : ' m3u8 download '
' skip_download ' : ' m3u8 download '
}
}
} , {
} , {
' url ' : ' https://www.ondemandkorea.com/ confession-e01- 1.html' ,
' url ' : ' https://www.ondemandkorea.com/ work-later-drink-now-e 1.html' ,
' info_dict ' : {
' info_dict ' : {
' id ' : ' confession-e01- 1' ,
' id ' : ' work-later-drink-now-e 1' ,
' ext ' : ' mp4 ' ,
' ext ' : ' mp4 ' ,
' title ' : ' Confession : E01' ,
' title ' : ' Work Later, Drink Now : E01' ,
' description ' : ' Choi Do-hyun, a criminal attorney, is the son of a death row convict. Ever since Choi Pil-su got arrested for murder, Do-hyun has wanted to solve his ' ,
' description ' : ' Work Later, Drink First follows three women who find solace in a glass of liquor at the end of the day. So-hee, who gets comfort from a cup of soju af ' ,
' thumbnail ' : r ' re:^https?://.* \ . j pg$' ,
' thumbnail ' : r ' re:^https?://.* \ . pn g$' ,
' subtitles ' : {
' subtitles ' : {
' English ' : ' mincount:1 ' ,
' English ' : ' mincount:1 ' ,
} ,
} ,
@ -69,9 +69,11 @@ class OnDemandKoreaIE(InfoExtractor):
webpage , ' episode_title ' , fatal = False ) or self . _og_search_title ( webpage )
webpage , ' episode_title ' , fatal = False ) or self . _og_search_title ( webpage )
jw_config = self . _parse_json (
jw_config = self . _parse_json (
self . _search_regex (
self . _search_regex ( (
r ' (?P<options> { \ s*[ \' " ]tracks[ \' " ].*?})[) \ ];]+$ ' ,
r ' playlist \ s*= \ s* \ [(?P<options>.+)];?$ ' ,
r ' playlist \ s*= \ s* \ [(?P<options>.+)];?$ ' ,
webpage , ' jw config ' , flags = re . MULTILINE , group = ' options ' ) ,
r ' odkPlayer \ .init.*?(?P<options> { [^;]+}).*?; ' ,
) , webpage , ' jw config ' , flags = re . MULTILINE | re . DOTALL , group = ' options ' ) ,
video_id , transform_source = js_to_json )
video_id , transform_source = js_to_json )
info = self . _parse_jwplayer_data (
info = self . _parse_jwplayer_data (
jw_config , video_id , require_title = False , m3u8_id = ' hls ' ,
jw_config , video_id , require_title = False , m3u8_id = ' hls ' ,