<s> __all__ = [ '<STR_LIT>' ] <EOL> from . . common import * <EOL> from urllib . parse import urlparse <EOL> from json import loads <EOL> import re <EOL> def yixia_miaopai_download_by_scid ( scid , output_dir = '<STR_LIT:.>' , merge = True , info_only = False ) : <EOL> """<STR_LIT>""" <EOL> api_endpoint = '<STR_LIT>' . format ( scid = scid ) <EOL> html = get_content ( api_endpoint ) <EOL> api_content = loads ( html ) <EOL> video_url = match1 ( api_content [ '<STR_LIT:result>' ] [ '<STR_LIT>' ] [ '<STR_LIT>' ] , r'<STR_LIT>' ) <EOL> title = api_content [ '<STR_LIT:result>' ] [ '<STR_LIT>' ] [ '<STR_LIT:t>' ] <EOL> type , ext , size = url_info ( video_url ) <EOL> print_info ( site_info , title , type , size ) <EOL> if not info_only : <EOL> download_urls ( [ video_url ] , title , ext , size , output_dir , merge = merge ) <EOL> def yixia_xiaokaxiu_download_by_scid ( scid , output_dir = '<STR_LIT:.>' , merge = True , info_only = False ) : <EOL> """<STR_LIT>""" <EOL> api_endpoint = '<STR_LIT>' . format ( scid = scid ) <EOL> html = get_content ( api_endpoint ) <EOL> api_content = loads ( html ) <EOL> video_url = api_content [ '<STR_LIT:data>' ] [ '<STR_LIT>' ] <EOL> title = api_content [ '<STR_LIT:data>' ] [ '<STR_LIT:title>' ] <EOL> type , ext , size = url_info ( video_url ) <EOL> print_info ( site_info , title , type , size ) <EOL> if not info_only : <EOL> download_urls ( [ video_url ] , title , ext , size , output_dir , merge = merge ) <EOL> def yixia_download ( url , output_dir = '<STR_LIT:.>' , merge = True , info_only = False , ** kwargs ) : <EOL> """<STR_LIT>""" <EOL> hostname = urlparse ( url ) . hostname <EOL> if '<STR_LIT>' in hostname : <EOL> yixia_download_by_scid = yixia_miaopai_download_by_scid <EOL> site_info = "<STR_LIT>" <EOL> if re . match ( r'<STR_LIT>' , url ) : <EOL> scid = match1 ( url , r'<STR_LIT>' ) <EOL> elif re . match ( r'<STR_LIT>' , url ) : <EOL> scid = match1 ( url , r'<STR_LIT>' ) <EOL> elif re . match ( r'<STR_LIT>' , url ) : <EOL> scid = match1 ( url , r'<STR_LIT>' ) <EOL> elif '<STR_LIT>' in hostname : <EOL> yixia_download_by_scid = yixia_xiaokaxiu_download_by_scid <EOL> site_info = "<STR_LIT>" <EOL> if re . match ( r'<STR_LIT>' , url ) : <EOL> scid = match1 ( url , r'<STR_LIT>' ) <EOL> elif re . match ( r'<STR_LIT>' , url ) : <EOL> scid = match1 ( url , r'<STR_LIT>' ) <EOL> else : <EOL> pass <EOL> yixia_download_by_scid ( scid , output_dir , merge , info_only ) <EOL> site_info = "<STR_LIT>" <EOL> download = yixia_download <EOL> download_playlist = playlist_not_supported ( '<STR_LIT>' ) </s>
