diff --git a/WebCrawler/javdb.py b/WebCrawler/javdb.py index 7bb6f3a..b10688e 100755 --- a/WebCrawler/javdb.py +++ b/WebCrawler/javdb.py @@ -304,6 +304,9 @@ def main(number): userrating = getUserRating(lx) if userrating: dic['userrating'] = userrating + dic['rating'] = userrating + rating_score = float(userrating) * 20.0 + dic['criticrating'] = '{:.1f}'.format(rating_score) # 保存小数点后1位即可 if not dic['actor'] and re.match(r'FC2-[\d]+', number, re.A): dic['actor'].append('素人') if not dic['series']: diff --git a/core.py b/core.py index 7a6bfea..9ba1ae7 100644 --- a/core.py +++ b/core.py @@ -356,6 +356,10 @@ def print_files(path, leak_word, c_word, naming_rule, part, cn_sub, json_data, f print(" " + release + "", file=code) if 'userrating' in json_data: print(" " + json_data['userrating'] + "", file=code) + if 'rating' in json_data: + print(" " + json_data['rating'] + "", file=code) + if 'criticrating' in json_data: + print(" " + json_data['criticrating'] + "", file=code) print(" " + cover + "", file=code) if config.getInstance().is_trailer(): print(" " + trailer + "", file=code)