#NEWLINE# def cntv_download( url , output_dir = '.' , merge = True , info_only = False , **kwargs ) : #NEWLINE# #INDENT# if re . match ( 'http://tv\\.cntv\\.cn/video/(\\w+)/(\\w+)' , url ) : #NEWLINE# #INDENT# id = match1 ( url , 'http://tv\\.cntv\\.cn/video/\\w+/(\\w+)' ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( re . match ( 'http://\\w+\\.cntv\\.cn/(\\w+/\\w+/(classpage/video/)?)?\\d+/\\d+\\.shtml' , url ) or re . match ( 'http://\\w+.cntv.cn/(\\w+/)*VIDE\\d+.shtml' , url ) ) : #NEWLINE# #INDENT# id = r1 ( 'videoCenterId","(\\w+)"' , get_html ( url ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if re . match ( 'http://xiyou.cntv.cn/v-[\\w-]+\\.html' , url ) : #NEWLINE# #INDENT# id = r1 ( 'http://xiyou.cntv.cn/v-([\\w-]+)\\.html' , info_only ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# raise NotImplementedError ( url ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# cntv_download_by_id ( id , output_dir = output_dir , merge = merge , info_only = info_only )