Example #1
0
 # 不包含车牌的标题
 title_only = car_titleg.group(2)
 # javlibrary的精彩影评   (.+?\s*.*?\s*.*?\s*.*?) 下面的匹配可能很奇怪,没办法,就这么奇怪
 if settings.bool_review:
     list_all_reviews = re.findall(
         r'(textarea style="display: none;" class="hidden">[\s\S]*?scoreup">\d\d+)',
         html_web, re.DOTALL)
     if list_all_reviews:
         review = '【精彩影评】:'
         for rev in list_all_reviews:
             list_reviews = re.findall(
                 r'hidden">([\s\S]*?)</textarea>', rev,
                 re.DOTALL)
             if list_reviews:
                 review = review + list_reviews[-1] + '////'
         review = replace_xml(review)
     else:
         review = ''
 else:
     review = ''
 # print(review)
 # 有大部分信息的html_web
 html_all = html_web
 #print(html_all)
 html_web = re.search(r'video_title"([\s\S]*?)favorite_edit',
                      html_web, re.DOTALL).group(1)
 # DVD封面cover
 coverg = re.search(r'src="(.+?)" width="600', html_web)
 if str(coverg) != 'None':
     url_cover = coverg.group(1)
 else:
                                    '个失败!找不到简介,尽管arzon上有搜索结果:' +
                                    path_relative + '\n')
                    else:
                        num_warn += 1
                        record_warn('    >第' + str(num_warn) +
                                    '个失败!找不到简介,影片被arzon下架:' + path_relative +
                                    '\n')
                    # 需要翻译简介
                    if settings.bool_tran:
                        plot = translate(tran_id, tran_sk, plot, to_language)
                        if plot.startswith('【百度'):
                            num_fail += 1
                            record_fail('    >第' + str(num_fail) +
                                        '个失败!翻译简介失败:' + path_relative + '\n')
                    # 去除xml文档不允许的特殊字符 &<>  \/:*?"<>|
                    plot = replace_xml(plot)
                    # print(plot)
                else:
                    plot = ''
                #######################################################################
                dict_data['视频'] = dict_data[
                    '原文件名'] = jav.name_no_ext  # dict_data['视频'],先定义为原文件名,即将发生变化。
                dict_data['原文件夹名'] = jav.folder
                # 是CD1还是CDn?
                num_all_episodes = dict_car_pref[jav.car]  # 该车牌总共多少集
                if num_all_episodes > 1:
                    str_cd = '-cd' + str(jav.episode)
                else:
                    str_cd = ''

                # 1重命名视频【相同】