diff --git a/WebCrawler/javdb.py b/WebCrawler/javdb.py
index 93698d0..4b66846 100755
--- a/WebCrawler/javdb.py
+++ b/WebCrawler/javdb.py
@@ -172,6 +172,12 @@ def getSeries(html):
result1 = str(html.xpath('//strong[contains(text(),"系列")]/../span/text()')).strip(" ['']")
result2 = str(html.xpath('//strong[contains(text(),"系列")]/../span/a/text()')).strip(" ['']")
return str(result1 + result2).strip('+').replace("', '", '').replace('"', '')
+def getUserRating(html):
+ try:
+ result = str(html.xpath('//span[@class="score-stars"]/../text()')[0])
+ return result[:result.find('分')].strip()
+ except:
+ return
def main(number):
# javdb更新后同一时间只能登录一个数字站,最新登录站会踢出旧的登录,因此按找到的第一个javdb*.json文件选择站点,
@@ -295,6 +301,9 @@ def main(number):
'series': getSeries(lx),
}
+ userrating = getUserRating(lx)
+ if userrating is not None:
+ dic['userrating'] = userrating
if not dic['actor'] and re.match(r'FC2-[\d]+', number, re.A):
dic['actor'].append('素人')
if not dic['series']:
@@ -324,7 +333,7 @@ if __name__ == "__main__":
# print(main('FC2-1174949')) # not found
#print(main('MVSD-439'))
# print(main('EHM0001')) # not found
- print(main('FC2-2314275'))
+ #print(main('FC2-2314275'))
# print(main('EBOD-646'))
# print(main('LOVE-262'))
- #print(main('ABP-890'))
+ print(main('ABP-890'))
diff --git a/core.py b/core.py
index 15eadb4..0a80a75 100644
--- a/core.py
+++ b/core.py
@@ -354,6 +354,8 @@ def print_files(path, leak_word, c_word, naming_rule, part, cn_sub, json_data, f
print(" " + release + "", file=code)
print(" " + release + "", file=code)
print(" " + release + "", file=code)
+ if 'userrating' in json_data:
+ print(" " + json_data['userrating'] + "", file=code)
print(" " + cover + "", file=code)
if config.getInstance().is_trailer():
print(" " + trailer + "", file=code)