Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

将文件保存路径加入path,避免VScode直接打开运行报错 #59

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
*.pyc
Log/*

4 changes: 4 additions & 0 deletions AVDC_Main.py
Original file line number Diff line number Diff line change
Expand Up @@ -1669,6 +1669,10 @@ def AVDC_Main(self):
'''
主函数
'''
# ==============================================将文件保存路径加入path,避免VScode直接打开运行报错
location = os.path.dirname(sys.argv[0])
os.chdir(location)

app = QApplication(sys.argv)
ui = MyMAinWindow()
ui.show()
Expand Down
9 changes: 5 additions & 4 deletions Getter/fc2fans_club.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import json
from Function.getHtml import get_html

fc2_url = 'https://fc2club.net'

def getTitle(htmlcode): # 获取标题
html = etree.fromstring(htmlcode, etree.HTMLParser())
Expand Down Expand Up @@ -52,7 +53,7 @@ def getRelease(htmlcode2): #
def getCover(htmlcode): # 获取封面 #
html = etree.fromstring(htmlcode, etree.HTMLParser())
result2 = str(html.xpath('//*[@id="slider"]/ul[1]/li[1]/img/@src')).strip(" ['']")
return 'https://fc2club.com' + result2
return fc2_url + result2


def getScore(htmlcode): # 获取评分 #
Expand All @@ -67,7 +68,7 @@ def getExtraFanart(htmlcode): # 获取剧照
list_tmp = html.xpath("//div[@id='slider']/ul[@class='slides']/li/img[@class='responsive']/@src")
extrafanart_list = []
for extrafanart in list_tmp:
extrafanart = 'https://fc2club.com' + extrafanart
extrafanart = fc2_url + extrafanart
extrafanart_list.append(extrafanart)
return extrafanart_list

Expand All @@ -88,7 +89,7 @@ def getYear(release):

def main(number, appoint_url):
try:
url = 'https://fc2club.com//html/FC2-' + number + '.html'
url = fc2_url + '/html/' + number + '.html'
if appoint_url:
url = appoint_url
htmlcode = get_html(url)
Expand All @@ -115,7 +116,7 @@ def main(number, appoint_url):
'publisher': '',
'year': '',
'outline': '',
'website': 'https://fc2club.com//html/FC2-' + number + '.html',
'website': fc2_url + '/html/' + number + '.html',
'source': 'fc2fans_club.py',
}
except TimeoutError:
Expand Down
14 changes: 7 additions & 7 deletions config.ini
Original file line number Diff line number Diff line change
Expand Up @@ -5,31 +5,31 @@ success_output_folder = JAV_output
failed_file_move = 1
soft_link = 0
show_poster = 1
website = all
website = fc2club
# all or mgstage or fc2club or javbus or jav321 or javdb or avsox or xcity or dmm

[proxy]
type = http
proxy = 127.0.0.1:10809
type = socks5
proxy = 127.0.0.1:1089
timeout = 7
retry = 3
# type: no, http, socks5

[Name_Rule]
folder_name = actor/number-title-release
folder_name = actor/
naming_media = number-title
naming_file = number

[update]
update_check = 1
update_check = 0

[log]
save_log = 1

[media]
media_type = .mp4|.avi|.rmvb|.wmv|.mov|.mkv|.flv|.ts|.webm|.MP4|.AVI|.RMVB|.WMV|.MOV|.MKV|.FLV|.TS|.WEBM
sub_type = .smi|.srt|.idx|.sub|.sup|.psb|.ssa|.ass|.txt|.usf|.xss|.ssf|.rt|.lrc|.sbv|.vtt|.ttml
media_path = E:/TEMP
media_path = D:/Download/QQDownload/A

[escape]
literals = \()
Expand All @@ -41,7 +41,7 @@ switch = 1

[emby]
emby_url = localhost:8096
api_key = 7c3529128b0542b081d32991b536fb9d
api_key = d38fe106c5674cffa024d91c1b569cb4

[mark]
poster_mark = 1
Expand Down