javbus:fix uri
This commit is contained in:
@@ -47,9 +47,10 @@ def getYear(htmlcode): #获取年份
|
|||||||
def getCover(htmlcode): #获取封面链接
|
def getCover(htmlcode): #获取封面链接
|
||||||
doc = pq(htmlcode)
|
doc = pq(htmlcode)
|
||||||
image = doc('a.bigImage')
|
image = doc('a.bigImage')
|
||||||
if not "javbus.com" in image.attr('href'):
|
uri = image.attr('href')
|
||||||
return "https://www.javbus.com" + image.attr('href')
|
if uri[0] == '/':
|
||||||
return image.attr('href')
|
return "https://www.javbus.com" + uri
|
||||||
|
return uri
|
||||||
def getRelease(htmlcode): #获取出版日期
|
def getRelease(htmlcode): #获取出版日期
|
||||||
html = etree.fromstring(htmlcode, etree.HTMLParser())
|
html = etree.fromstring(htmlcode, etree.HTMLParser())
|
||||||
result = str(html.xpath('/html/body/div[5]/div[1]/div[2]/p[2]/text()')).strip(" ['']")
|
result = str(html.xpath('/html/body/div[5]/div[1]/div[2]/p[2]/text()')).strip(" ['']")
|
||||||
@@ -193,3 +194,4 @@ def main(number):
|
|||||||
|
|
||||||
if __name__ == "__main__" :
|
if __name__ == "__main__" :
|
||||||
print(main('ipx-292'))
|
print(main('ipx-292'))
|
||||||
|
print(main('CEMD-011'))
|
||||||
|
|||||||
7
core.py
7
core.py
@@ -4,6 +4,7 @@ import pathlib
|
|||||||
import re
|
import re
|
||||||
import shutil
|
import shutil
|
||||||
import platform
|
import platform
|
||||||
|
import errno
|
||||||
|
|
||||||
from PIL import Image
|
from PIL import Image
|
||||||
from io import BytesIO
|
from io import BytesIO
|
||||||
@@ -644,6 +645,9 @@ def paste_file_to_folder(filepath, path, number, leak_word, c_word, conf: config
|
|||||||
except PermissionError:
|
except PermissionError:
|
||||||
print('[-]Error! Please run as administrator!')
|
print('[-]Error! Please run as administrator!')
|
||||||
return
|
return
|
||||||
|
except OSError as oserr:
|
||||||
|
print('[-]OS Error errno ' + oserr.errno)
|
||||||
|
return
|
||||||
|
|
||||||
|
|
||||||
def paste_file_to_folder_mode2(filepath, path, multi_part, number, part, leak_word, c_word, conf): # 文件路径,番号,后缀,要移动至的位置
|
def paste_file_to_folder_mode2(filepath, path, multi_part, number, part, leak_word, c_word, conf): # 文件路径,番号,后缀,要移动至的位置
|
||||||
@@ -671,6 +675,9 @@ def paste_file_to_folder_mode2(filepath, path, multi_part, number, part, leak_wo
|
|||||||
except PermissionError:
|
except PermissionError:
|
||||||
print('[-]Error! Please run as administrator!')
|
print('[-]Error! Please run as administrator!')
|
||||||
return
|
return
|
||||||
|
except OSError as oserr:
|
||||||
|
print('[-]OS Error errno ' + oserr.errno)
|
||||||
|
return
|
||||||
|
|
||||||
def get_part(filepath, failed_folder):
|
def get_part(filepath, failed_folder):
|
||||||
try:
|
try:
|
||||||
|
|||||||
Reference in New Issue
Block a user