Skip to content

Commit

Permalink
fix(airav): airav jp 域名失效 (close #122)
Browse files Browse the repository at this point in the history
  • Loading branch information
sqzw-x committed Mar 7, 2024
1 parent ac5307c commit 7ca6e70
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 184 deletions.
2 changes: 1 addition & 1 deletion src/models/config/config_manual.py
Original file line number Diff line number Diff line change
Expand Up @@ -497,7 +497,7 @@ class ManualConfig:
'.chs',
]
web_dic = {
'airav.cc': 'airav_cc',
'airav.io': 'airav_cc',
'airav.wiki': 'airav',
'9sex': 'avsex',
'avsex': 'avsex',
Expand Down
12 changes: 6 additions & 6 deletions src/models/core/crawler.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
from models.base.number import get_number_letters, is_uncensored
from models.config.config import config
from models.core.flags import Flags
from models.crawlers import airav_cc_new, airav_new, avsex, avsox, cnmdb, dahlia, dmm, faleno, fantastica, fc2, fc2club, \
fc2hub, freejavbt, getchu, getchu_dmm, giga, hdouban, iqqtv_new, jav321, javbus, javdb, javlibrary_new, kin8, love6, \
lulubar, madouqu, mdtv, mgstage, mmtv, mywife, official, prestige, theporndb, xcity, hscangku, cableav
from models.crawlers import airav, airav_cc, avsex, avsox, cableav, cnmdb, dahlia, dmm, faleno, fantastica, fc2, \
fc2club, fc2hub, freejavbt, getchu, getchu_dmm, giga, hdouban, hscangku, iqqtv_new, jav321, javbus, javdb, \
javlibrary_new, kin8, love6, lulubar, madouqu, mdtv, mgstage, mmtv, mywife, official, prestige, theporndb, xcity
from models.entity.enums import FileMode


Expand Down Expand Up @@ -102,9 +102,9 @@ def _call_crawler(json_data, website, language, file_number, short_number, mosai
elif website == 'avsex':
json_data = json.loads(avsex.main(file_number, appoint_url, log_info, req_web, language))
elif website == 'airav_cc':
json_data = json.loads(airav_cc_new.main(file_number, appoint_url, log_info, req_web, language))
json_data = json.loads(airav_cc.main(file_number, appoint_url, log_info, req_web, language))
elif website == 'airav':
json_data = json.loads(airav_new.main(file_number, appoint_url, log_info, req_web, language))
json_data = json.loads(airav.main(file_number, appoint_url, log_info, req_web, language))
elif website == 'freejavbt':
json_data = json.loads(freejavbt.main(file_number, appoint_url, log_info, req_web, language))
elif website == 'javbus':
Expand Down Expand Up @@ -142,7 +142,7 @@ def _call_crawler(json_data, website, language, file_number, short_number, mosai
hscangku.main(file_number, appoint_url, log_info, req_web, language, file_path, appoint_number))
elif website == 'cableav':
json_data = json.loads(
cableav.main(file_number, appoint_url, log_info, req_web, language, file_path, appoint_number))
cableav.main(file_number, appoint_url, log_info, req_web, language, file_path, appoint_number))
elif website == 'getchu':
json_data = json.loads(getchu.main(file_number, appoint_url, log_info, req_web, language))
elif website == 'getchu_dmm':
Expand Down
10 changes: 5 additions & 5 deletions src/models/crawlers/airav_cc.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ def retry_request(real_url, log_info, web_info):
def main(number, appoint_url='', log_info='', req_web='', language='zh_cn'):
start_time = time.time()
website_name = 'airav_cc'
req_web += '-> %s[%s]' % (website_name, language)
req_web += f'-> {website_name}[{language}]'
number = number.upper()
if re.match(r'N\d{4}', number): # n1403
number = number.lower()
Expand All @@ -123,11 +123,11 @@ def main(number, appoint_url='', log_info='', req_web='', language='zh_cn'):
image_download = False
url_search = ''
mosaic = '有码'
airav_url = getattr(config, 'airav_cc_website', 'https://airav5.fun')
airav_url = getattr(config, 'airav_cc_website', 'https://airav.io')
if language == 'zh_cn':
airav_url += '/cn'
web_info = '\n '
log_info += ' \n 🌐 airav[%s]' % language.replace('zh_', '')
log_info += f' \n 🌐 airav[{language.replace("zh_", "")}]'
debug_info = ''

# real_url = 'https://airav5.fun/jp/playon.aspx?hid=44733'
Expand Down Expand Up @@ -258,9 +258,9 @@ def main(number, appoint_url='', log_info='', req_web='', language='zh_cn'):

if __name__ == '__main__':
# yapf: disable
# print(main('', 'https://airav5.fun/playon.aspx?hid=99-21-46640'))
print(main('', 'https://airav.io/playon.aspx?hid=99-21-46640'))
# print(main('PRED-300')) # 马赛克破坏版
print(main('snis-036', language='jp'))
# print(main('snis-036', language='jp'))
# print(main('snis-036'))
# print(main('MIAE-346'))
# print(main('STARS-1919')) # poster图片
Expand Down
84 changes: 0 additions & 84 deletions src/models/crawlers/airav_cc_new.py

This file was deleted.

88 changes: 0 additions & 88 deletions src/models/crawlers/airav_new.py

This file was deleted.

0 comments on commit 7ca6e70

Please sign in to comment.