Skip to content

Commit

Permalink
v1.4.0: 更新JM请求配置 (#11)
Browse files Browse the repository at this point in the history
  • Loading branch information
hect0x7 authored Apr 7, 2023
1 parent 6e465ec commit ca59399
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 35 deletions.
18 changes: 2 additions & 16 deletions assets/config/option_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ download_use_disk_cache: true
client_config:
# 请求失败时,重试的次数,配个正数就行
retry_times: 10
domain: jmcomic1.group
domain: null
postman_type: cffi
postman_type_list:
- requests
Expand All @@ -24,18 +24,4 @@ client_config:
meta_data:
proxies: null
allow_redirects: true
cookies: null
headers:
accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9
accept-language: zh-CN,zh;q=0.9
authority: jmcomic1.group
sec-ch-ua: '"Not_A Brand";v="99", "Google Chrome";v="109", "Chromium";v="109"'
sec-ch-ua-mobile: ?0
sec-ch-ua-platform: '"Windows"'
sec-fetch-dest: document
sec-fetch-mode: navigate
sec-fetch-site: none
sec-fetch-user: ?1
upgrade-insecure-requests: '1'
user-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML,
like Gecko) Chrome/109.0.0.0 Safari/537.36
cookies: null
14 changes: 0 additions & 14 deletions assets/config/workflow_option.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,3 @@ client_config:
proxies: null
allow_redirects: true
cookies: null
headers:
accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9
accept-language: zh-CN,zh;q=0.9
authority: jmcomic1.rocks
sec-ch-ua: '"Not_A Brand";v="99", "Google Chrome";v="109", "Chromium";v="109"'
sec-ch-ua-mobile: ?0
sec-ch-ua-platform: '"Windows"'
sec-fetch-dest: document
sec-fetch-mode: navigate
sec-fetch-site: none
sec-fetch-user: ?1
upgrade-insecure-requests: '1'
user-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML,
like Gecko) Chrome/109.0.0.0 Safari/537.36
2 changes: 1 addition & 1 deletion src/jmcomic/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
# 被依赖方 <--- 使用方
# config <--- entity <--- toolkit <--- client <--- service <--- option

__version__ = '1.3.0'
__version__ = '1.4.0'

from .api import *
6 changes: 3 additions & 3 deletions src/jmcomic/jm_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,17 +30,17 @@ def default_headers(cls):
return {
'authority': cls.DOMAIN,
'accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,'
'application/signed-exchange;v=b3;q=0.9',
'application/signed-exchange;v=b3;q=0.7',
'accept-language': 'zh-CN,zh;q=0.9',
'sec-ch-ua': '"Not_A Brand";v="99", "Google Chrome";v="109", "Chromium";v="109"',
'sec-ch-ua': '"Google Chrome";v="111", "Not(A:Brand";v="8", "Chromium";v="111"',
'sec-ch-ua-mobile': '?0',
'sec-ch-ua-platform': '"Windows"',
'sec-fetch-dest': 'document',
'sec-fetch-mode': 'navigate',
'sec-fetch-site': 'none',
'sec-fetch-user': '?1',
'upgrade-insecure-requests': '1',
'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 '
'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/111.0.0.0 '
'Safari/537.36',
}

Expand Down
2 changes: 1 addition & 1 deletion src/jmcomic/jm_toolkit.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@


class JmcomicText:
pattern_jm_domain = compile('https://([\w.]+)')
pattern_jm_domain = compile('https://([\w.-]+)')
pattern_jm_pa_id = compile('/(photos?|album)/(\d+)')

pattern_html_photo_photo_id = compile('<meta property="og:url" content=".*?/photo/(\d+)/?.*?">')
Expand Down

0 comments on commit ca59399

Please sign in to comment.