Exemplo n.º 1
0
 #print(score)
 dict_data['评分'] = score
 # 烂番茄评分 用上面的评分*10
 criticrating = str(float(score) * 10)
 ################################################################################
 # 去arzon找简介
 if settings.bool_nfo and settings.bool_plot and jav.episode == 1:
     # 获得简介或失败信息
     plot, status_arzon, cookie_arzon = find_plot_arzon(
         car, cookie_arzon, proxy_arzon)
     if status_arzon == 0:
         pass
     elif status_arzon == 1:
         num_warn += 1
         record_warn('    >第' + str(num_warn) +
                     '个失败!找不到简介,尽管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)
     num_fail += 1
     record_fail('    >第' + str(num_fail) +
                 '个失败!发现新的特征需要添加至【特征对照表】:' + str(error) + '\n')
     continue
 # print(genres)
 # arzon的简介 #########################################################
 # 去arzon找简介
 if settings.bool_nfo and settings.bool_plot and jav.episode == 1:
     plot, status_arzon, acook = find_plot_arzon(
         car, cookie_arzon, proxy_arzon)
     if status_arzon == 0:
         pass
     elif status_arzon == 1:
         num_warn += 1
         record_warn('    >第' + str(num_warn) +
                     '个失败!找不到简介,尽管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)