Repository: hect0x7/JMComic-APK
Branch: master
Commit: 9103088e7230
Files: 6
Total size: 8.8 KB
Directory structure:
gitextract_izt0_4ul/
├── .github/
│ └── workflows/
│ └── auto_release.yml
├── APK_VERSION.txt
├── README.md
├── main.py
├── op.yml
└── requirements.txt
================================================
FILE CONTENTS
================================================
================================================
FILE: .github/workflows/auto_release.yml
================================================
# This is a basic workflow to help you get started with Actions
name: Check JMComic Android APK
# Controls when the workflow will run
on:
push:
workflow_dispatch:
schedule:
- cron: '0 */2 * * *'
permissions:
contents: write
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.11
uses: actions/setup-python@v4
with:
python-version: "3.11"
- name: Install Dependency
run: |
python -m pip install --upgrade pip
pip install jmcomic
- name: Run Script
id: script
run: |
python main.py
- name: Release
if: ${{ steps.script.outputs.found_new == 'true'}}
uses: softprops/action-gh-release@v1
with:
name: v${{ steps.script.outputs.new_ver }}
tag_name: ${{ steps.script.outputs.new_ver }}
draft: false
files: |
${{ steps.script.outputs.new_ver }}.apk
body: |
禁漫APP v${{ steps.script.outputs.new_ver }}
你可以直接下载Assets的`${{ steps.script.outputs.new_ver }}.apk`使用,或者从禁漫官网下载:
禁漫官网的`${{ steps.script.outputs.new_ver }}.apk`下载链接:
1. [${{ steps.script.outputs.download_path1 }}](${{ steps.script.outputs.download_path1 }})
2. [${{ steps.script.outputs.download_path2 }}](${{ steps.script.outputs.download_path2 }})
3. [https://18comic.vip/stray](https://18comic.vip/stray/)(发布页)
`${{ steps.script.outputs.new_ver }}.apk`的更新信息:
> ${{ steps.script.outputs.desc }}
- name: Commit
if: ${{ steps.script.outputs.found_new == 'true'}}
run: |
# Extract the version number from the previous step
version=${{ steps.script.outputs.new_ver }}
git config --global user.email "93357912+hect0x7@users.noreply.github.com"
git config --global user.name "hect0x7"
git tag -a "v$version" -m "Version $version"
git add ./APK_VERSION.txt
git commit -m "update APK_VERSION.txt"
git push
echo "finished"
================================================
FILE: APK_VERSION.txt
================================================
2.0.18
================================================
FILE: README.md
================================================
<div align="center">
<h1 style="margin-top: 0">JMComic-APK</h1>
<p>
<strong>基于jmcomic库自动检查禁漫APK更新</strong>
</p>
[](https://github.com/hect0x7)
[](https://github.com/hect0x7/JMComic-APK/releases/latest)
[](https://github.com/hect0x7/JMComic-APK/releases/latest)
</div>

## 项目介绍
使用GitHub Actions定时检查禁漫APK是否有更新,如果有,就下载一份保存到Release中。
[✨✨✨点我去APK下载界面✨✨✨](https://github.com/hect0x7/JMComic-APK/releases/latest)
## Star历史图
<a href="https://github.com/hect0x7/JMComic-Crawler-Python">
<picture>
<source media="(prefers-color-scheme: dark)" srcset="https://api.star-history.com/svg?repos=hect0x7/JMComic-Crawler-Python%2Chect0x7/JMComic-APK&type=Date&theme=dark" />
<source media="(prefers-color-scheme: light)" srcset="https://api.star-history.com/svg?repos=hect0x7/JMComic-Crawler-Python%2Chect0x7/JMComic-APK&type=Date" />
<img alt="Star History Chart" src="https://api.star-history.com/svg?repos=hect0x7/JMComic-Crawler-Python%2Chect0x7/JMComic-APK&type=Date" />
</picture>
</a>
## 相关项目推荐
本项目的代码基于[`jmcomic`](https://github.com/hect0x7/JMComic-Crawler-Python)库,这是我写的一个pip库,支持用python代码访问禁漫天堂。
> 引流:[jmcomic](https://github.com/hect0x7/JMComic-Crawler-Python) 还可以帮你一键批量下载禁漫本子
<a href="https://github.com/hect0x7/JMComic-Crawler-Python">
<picture>
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/hect0x7/hect0x7/refs/heads/master/profile/pin-JMComic-Crawler-Python-dark.svg?t=1" />
<source media="(prefers-color-scheme: light)" srcset="https://raw.githubusercontent.com/hect0x7/hect0x7/refs/heads/master/profile/pin-JMComic-Crawler-Python.svg?t=1" />
<img alt="Repo Card" src="https://raw.githubusercontent.com/hect0x7/hect0x7/refs/heads/master/profile/pin-JMComic-Crawler-Python-dark.svg?t=1" />
</picture>
</a>
---
此外,如果你需要**离线浏览已下载的本子**,可以使用 [`plugin-jm-server`](https://github.com/hect0x7/plugin-jm-server)。
> [**plugin-jm-server**](https://github.com/hect0x7/plugin-jm-server) 是一个“离线版”禁漫天堂文件服务器,支持在浏览器中查看本地文件夹内的图片。该项目界面模仿禁漫章节的下拉式观看页面,并适配了手机端。
<a href="https://github.com/hect0x7/plugin-jm-server">
<picture>
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/hect0x7/hect0x7/refs/heads/master/profile/pin-plugin-jm-server-dark.svg?t=1" />
<source media="(prefers-color-scheme: light)" srcset="https://raw.githubusercontent.com/hect0x7/hect0x7/refs/heads/master/profile/pin-plugin-jm-server.svg?t=1" />
<img alt="Repo Card" src="https://raw.githubusercontent.com/hect0x7/hect0x7/refs/heads/master/profile/pin-plugin-jm-server-dark.svg?t=1" />
</picture>
</a>
---
如果你希望**通过自然语言与 AI 交互来找本、看本**,那么 [`jmcomic-ai`](https://github.com/hect0x7/jmcomic-ai) 是你的不二之选。
> [jmcomic-ai](https://github.com/hect0x7/jmcomic-ai) 通过 MCP 和 Skills 将 `jmcomic` 的搜索、下载、排行榜等核心能力注入到你的 AI Agent(如 Cursor, Claude Desktop 等)中。现在你只需对 AI 说出“帮我找找主角是电锯人的漫画”或“下载搜索结果中浏览量前三的作品”,AI 就会自动为你执行复杂的爬虫任务。
<a href="https://github.com/hect0x7/jmcomic-ai">
<picture>
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/hect0x7/hect0x7/refs/heads/master/profile/pin-jmcomic-ai-dark.svg?t=1" />
<source media="(prefers-color-scheme: light)" srcset="https://raw.githubusercontent.com/hect0x7/hect0x7/refs/heads/master/profile/pin-jmcomic-ai.svg?t=1" />
<img alt="Repo Card" src="https://raw.githubusercontent.com/hect0x7/hect0x7/refs/heads/master/profile/pin-jmcomic-ai-dark.svg?t=1" />
</picture>
</a>
================================================
FILE: main.py
================================================
import json
import os
import re
from jmcomic import create_option, JmHtmlClient, JmApiClient, \
PatternTool, file_exists, write_text, read_text, \
save_resp_content, JmModuleConfig, JmcomicText, jm_log
apk_version_txt = './APK_VERSION.txt'
is_dev: bool = file_exists('.idea')
cur_ver: str = read_text(apk_version_txt).strip()
JmModuleConfig.FLAG_API_CLIENT_REQUIRE_COOKIES = False
op = create_option('op.yml')
html_cl: JmHtmlClient = op.new_jm_client(impl='html')
api_cl: JmApiClient = op.new_jm_client(impl='api')
def compare_versions(v1: str, v2: str) -> int:
parts1 = list(map(int, v1.split(".")))
parts2 = list(map(int, v2.split(".")))
# 补齐长度
length = max(len(parts1), len(parts2))
parts1 += [0] * (length - len(parts1))
parts2 += [0] * (length - len(parts2))
if parts1 > parts2:
return 1 # v1 大
elif parts1 < parts2:
return -1 # v2 大
else:
return 0 # 相等
def add_output(k, v):
cmd = f'echo "{k}={v}" >> $GITHUB_OUTPUT'
if is_dev:
print(cmd)
return
print(f'{cmd}: {os.system(cmd)}')
def download_new_ver(new_ver, download_path):
resp = html_cl.get(download_path)
save_resp_content(resp, f'./{new_ver}.apk')
write_text(apk_version_txt, new_ver)
def check_apk():
# new_ver, download_path = fetch_apk_ver_and_download_path()
new_ver, download_path, desc = fetch_apk_info_via_api()
add_output('new_ver', new_ver)
if compare_versions(new_ver, cur_ver) < 1:
add_output('found_new', 'false')
return
add_output('found_new', 'true')
add_output('download_path1', f'{JmModuleConfig.PROT}18comic.vip{download_path}')
add_output('download_path2', f'{JmModuleConfig.PROT}jmcomic.me{download_path}')
add_output('desc', desc.replace('\r\n', '\n').replace('\n', '<p>'))
download_new_ver(new_ver, download_path)
def fetch_apk_info_via_html():
resp = html_cl.get_jm_html('/stray/?utm_source=18comic')
apk_version_pattern = re.compile(r'a href="(/static/apk/(.*?).apk)"')
match = PatternTool.require_match(resp.text, apk_version_pattern, '未匹配上apk下载路径', None)
download_path, new_ver = match[1], match[2]
return new_ver, download_path
def get_download_path(url):
try:
domain = JmcomicText.parse_to_jm_domain(url)
return url.replace(JmModuleConfig.PROT, '').replace(domain, '')
except Exception as e:
jm_log('get_download_path', f'{e}: [{url}]')
return url.replace(JmModuleConfig.PROT, '')
def fetch_apk_info_via_api():
resp = api_cl.setting()
jm_log('apk.setting', json.dumps(resp.res_data, indent=2, ensure_ascii=False))
data = resp.model_data
version = data.jm3_version
return version, get_download_path(data.jm3_download_url), data.jm3_version_info
if __name__ == '__main__':
check_apk()
================================================
FILE: op.yml
================================================
client:
domain:
html: [ jmcomic1.me, jmcomic.me ]
================================================
FILE: requirements.txt
================================================
jmcomic
gitextract_izt0_4ul/ ├── .github/ │ └── workflows/ │ └── auto_release.yml ├── APK_VERSION.txt ├── README.md ├── main.py ├── op.yml └── requirements.txt
SYMBOL INDEX (7 symbols across 1 files) FILE: main.py function compare_versions (line 18) | def compare_versions(v1: str, v2: str) -> int: function add_output (line 34) | def add_output(k, v): function download_new_ver (line 43) | def download_new_ver(new_ver, download_path): function check_apk (line 49) | def check_apk(): function fetch_apk_info_via_html (line 65) | def fetch_apk_info_via_html(): function get_download_path (line 73) | def get_download_path(url): function fetch_apk_info_via_api (line 82) | def fetch_apk_info_via_api():
Condensed preview — 6 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (10K chars).
[
{
"path": ".github/workflows/auto_release.yml",
"chars": 2268,
"preview": "# This is a basic workflow to help you get started with Actions\n\nname: Check JMComic Android APK\n\n# Controls when the wo"
},
{
"path": "APK_VERSION.txt",
"chars": 6,
"preview": "2.0.18"
},
{
"path": "README.md",
"chars": 3787,
"preview": "<div align=\"center\">\n<h1 style=\"margin-top: 0\">JMComic-APK</h1>\n<p>\n<strong>基于jmcomic库自动检查禁漫APK更新</strong>\n</p>\n \n[![Gi"
},
{
"path": "main.py",
"chars": 2842,
"preview": "import json\nimport os\nimport re\n\nfrom jmcomic import create_option, JmHtmlClient, JmApiClient, \\\n PatternTool, file_e"
},
{
"path": "op.yml",
"chars": 57,
"preview": "client:\n domain:\n html: [ jmcomic1.me, jmcomic.me ]\n\n"
},
{
"path": "requirements.txt",
"chars": 8,
"preview": "jmcomic\n"
}
]
About this extraction
This page contains the full source code of the hect0x7/JMComic-APK GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 6 files (8.8 KB), approximately 2.9k tokens, and a symbol index with 7 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.