Giter Club home page Giter Club logo

Comments (6)

abcfy2 avatar abcfy2 commented on June 28, 2024

腾讯移动端的页面接口改了,之前是把章节信息全部放在XHR拿到的json中,现在看来是直接写到页面中去了,原来的那个XHR现在报404了。

我看看有没有优雅点的办法解决,时间不能保证。

from getcomic.

zhhr1122 avatar zhhr1122 commented on June 28, 2024

辛苦作者了!看您的代码和文章受益匪浅,也一直在用您的接口作为项目接口,希望能解决

from getcomic.

abcfy2 avatar abcfy2 commented on June 28, 2024

其实有个可能很长时间都有效的办法,就是利用腾讯动漫app android的离线下载功能。差不多它的算法我都搞清楚了,就是每个jpg文件头塞入了若干个字节(没仔细统计过),导致图片浏览器不识别,去掉这些被塞进去的混淆字节就可以用图片浏览器打开了。

这个可能麻烦点,但是估计长期有效。就是得从官方app把下载的目录全部导出来,在本地写个脚本去处理(Linux下的dd --seek目测都能搞定,只要能确定填充的字节数)

from getcomic.

zhhr1122 avatar zhhr1122 commented on June 28, 2024

您之前的代码也算长时间有效了,大概一年左右吧,都比较有效,腾讯一般也不太会去轻易更新的。
另外题外话,很谢谢作者啊,用您的算法我自己用flask-restful生成了API接口,然后开发成了APP,成功找到了工作,现在从事Android漫画相关开发工作,还是挺感谢您的!

from getcomic.

abcfy2 avatar abcfy2 commented on June 28, 2024

fixed. 图形化界面程序就懒得打包了,好久不用python打包了,都不知道cx_freeze和pyinstaller进化到什么程度了,以前的build脚本也找不到了,就懒得在windows下提供打包好的程序了。

腾讯基本上把页面上的XHR全废掉了,改到了渲染到页面上。不得已,只要加上废弃很久的依赖lxml了,通过lxml的xpath解析html页面元素。本来解析的都是pc页面的,但是发现pc页面当漫画章节少到没有分页时(比如这个: http://ac.qq.com/Comic/comicInfo/id/633890 ),页面章节列表布局不一样。懒得写两个xpath了,就干脆改到移动端的章节列表页面上: https://m.ac.qq.com/comic/chapterList/id/547278 这个页面无论章节多少都是有内容的,并且布局一样,一个xpath可以搞定。缺点是在章节列表页面上无法获取章节名字,因为这些按钮上的章节名字全是数字,我也很绝望啊。

所以暂时获取漫画信息和章节列表全走的是移动端页面 (m.ac.qq.com),欢迎PR解决获取不到章节名的问题。先就这么着吧。

from getcomic.

zhhr1122 avatar zhhr1122 commented on June 28, 2024

非常感谢作者,亲测可行!

http://120.79.66.128:5001/getChapterList/漫画ID/章节数
例如:
http://120.79.66.128:5001/getChapterList/505432/710
用您的代码我生成了接口,布置在阿里云上

个人项目APP又能正常运行了!

from getcomic.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.