Coder Social home page Coder Social logo

picJsonPage is empty about getcomic HOT 6 CLOSED

abcfy2 avatar abcfy2 commented on July 16, 2024
picJsonPage is empty

from getcomic.

Comments (6)

abcfy2 avatar abcfy2 commented on July 16, 2024

Ok. Maybe tencent comic has changed its page structure. I'll fix this issue, wait please.

from getcomic.

abcfy2 avatar abcfy2 commented on July 16, 2024

I've found the reason. Because the picJsonPage url like http://pad.ac.qq.com/View/mGetPicHash?id=512991&cid=27 must request with cookie, otherwise it will return nothing.

So I will parse the cookie, it may take some times.

from getcomic.

abcfy2 avatar abcfy2 commented on July 16, 2024

Bug fixed. Please check 535702b

Cookie must contains ac_refer=.

Please checkout the latest code and try again.

Windows bundle package is uploading.

from getcomic.

markx avatar markx commented on July 16, 2024

Good job!
May I ask you how you found the reason and what tools did you use?

from getcomic.

abcfy2 avatar abcfy2 commented on July 16, 2024

Chrome F12 developer tools and Firefox firebug add-on is my friends.

Also, the command tool curl is an awesome tool.

Curl can simulate and fake the browser request, it's helpful when debugging the request headers.

When I use curl -v http://pad.ac.qq.com/View/mGetPicHash?id=512991&cid=27, returns nothing, but chrome works well. So I compare the headers between curl and chrome, and finally I've found curl -v -H 'Cookie:xxxxxxxxxxxx(copy from chrome)' can get the json string. Then I know must request with Cookie. But the cookie string is too long, so I use firefox and open firebug to check the cookie. After flush all cookies, I've found that when the cookie add the ac_refer field, picjsonpage will return json string.

After all, use curl to verify.

curl -v -H 'Cookie: ac_refer=http://pad.ac.qq.com/Comic/comicInfo/id/512991' 'http://pad.ac.qq.com/View/mGetPicHash?id=512991&cid=27'

and it works.

from getcomic.

markx avatar markx commented on July 16, 2024

Cool!
Thanks.

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.