关于爬取腾讯动漫的博文

fengx07 发布于 2017/03/02 22:58
阅读 345
收藏 1

@Feng_Yu 你好,想跟你请教个问题:

大神你好,在网上看到你爬取腾讯动漫的帖子,很感兴趣。但一直想不明白js自动生成图片链接这一部分的规律你是怎么找到的。我查看了网页所有的js也没有找到相关的信息,望不吝赐教,叨扰了!谢谢!

加载中
0
Feng_Yu
Feng_Yu

最早腾讯动漫的PC端页面用的是flash(现在不是了),根本看不到拿到图片的这个过程,得反编译flash,更麻烦,而且我也不会。当时无意中用ipad打开ac.qq.com的时候,发现会跳转到m.ac.qq.com这个移动端的页面,众所周知,ipad和iphone根本没有flash,这个页面也没可能使用flash渲染图片。于是兴奋的拿起chrome和firefox的开发者工具开始干了。

 

上面的废话掰扯完毕,从m.ac.qq.com这个页面访问就可以看到完整的api请求过程了,从api会得到几个json,你也能猜测出来这些json肯定包含着图片信息。然后利用chrome或FF的开发者工具,把js格式化之后打断点,直到看到完整的图片URL为止,你就能找到是哪段js代码的哪段函数负责解析这个json了。读懂js代码之后用python实现这个算法就是一件相当容易的事情了。

现在腾讯动漫PC端页面不用flash了,而是把图片信息全部放在页面中的一个script标签中,你会找到一个类似于BASE64编码的字符串,但是直接无法反解析。同样的思路,打断点即可找到这段js代码,其实是移除掉了前两个字节之后再用base64反解析,直接拿到图片URL列表。

0
Feng_Yu
Feng_Yu

随便打开一个漫画的页面: http://ac.qq.com/ComicView/index/id/525550/cid/271

查看页面源码,你会发现这样的代码:

<script>
    var DATA        = 'BeyJjb21pYyI6eyJpZCI6NTI1NTUwLCJ0aXRsZSI6Ilx1OTRmNlx1NGU0Ylx1NWI4OFx1NTg5M1x1NGViYSIsImNvbGxlY3QiOiIxMjk1NjU5IiwiaXNKYXBhbkNvbWljIjpmYWxzZSwiaXNMaWdodE5vdmVsIjpmYWxzZSwiaXNMaWdodENvbWljIjpmYWxzZSwiaXNGaW5pc2giOmZhbHNlLCJlSWQiOiJLbEJPUUV0RFUxTlFCQWNmQVFjREFnMEpIRUp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MWI2ODAyMzMxZGE2MTEuanBnXC8wIiwidXJsIjoiaHR0cDpcL1wvYWMucXEuY29tXC9Db21pY1wvY29taWNJbmZvXC9pZFwvNTUyNjI0Iiwid2lkdGgiOiI2NTAiLCJoZWlnaHQiOiIxMTAifSwibGVmdCI6W10sImJvdHRvbSI6eyJ0aXRsZSI6Ilx1NzJmY1x1NGViYVx1NWY1Mlx1Njc2NSIsInBpYyI6Imh0dHBzOlwvXC9tYW5odWEucXBpYy5jblwvbWFuaHVhX2RldGFpbFwvMFwvMjhfMTBfMTZfMjdhMzk1N2I1NzU1MTEyMmM4N2I4NTc4MmVlZjY2NjIuanBnXC8wIiwidXJsIjoiaHR0cDpcL1wvYWMucXEuY29tXC9Db21pY1ZpZXdcL2luZGV4XC9pZFwvNTQzMzk2XC9jaWRcLzEiLCJ3aWR0aCI6IjY1MCIsImhlaWdodCI6IjExMCJ9fSwiYXJ0aXN0Ijp7ImF2YXRhciI6Imh0dHA6XC9cL3ExLnFsb2dvLmNuXC9nP2I9cXEmaz1udFRYdGI1cWp0dWRnZmtOOERBaGVRJnM9NjQwJnQ9MTQ4MzMwODA3OCIsIm5pY2siOiJcdTk2ZjZcdTc2ZGYtIiwidWluQ3J5cHQiOiJhMVF2TTB3MEswbE5OblZEY20wclEwRllWbUkwVVQwOSJ9fQ==',
        PRELOAD_NUM = 2,
        NOTICE_TIME = 15,
        ROAST_SIZE  = 300,
        ROAST_PRE   = 5,
        ROAST_VIEW  = 11,
        DANMU_TIME  = 10000;
</script>

那个DATA乍一看非常像BASE64,但是直接用base64反解析不了。打断点调试就会发现其实是移除了第一个字节之后反解析。得到这样的json:

{"comic":{"id":525550,"title":"\u94f6\u4e4b\u5b88\u5893\u4eba","collect":"1295659","isJapanComic":false,"isLightNovel":false,"isLightComic":false,"isFinish":false,"eId":"KlBOQEtDU1NQBAcfAQcDAg0JHEJYWCg="},"chapter":{"cid":271,"cTitle":"\u7b2c001\u5893\uff1a\u5b88\u5893\u4eba\u548c\u6e38\u620f","cSeq":"1","vipStatus":1,"prevCid":0,"nextCid":272,"blankFirst":1,"canRead":true},"picture":[{"pid":"5517","width":999,"height":1413,"url":"http:\/\/ac.tc.qq.com\/store_file_download?buid=15017&uin=1476761121&dir_path=\/&name=18_11_25_3cabad994ca291a40593c962e161dab8_5517.jpg"},{"pid":"5495","width":999,"height":1413,"url":"http:\/\/ac.tc.qq.com\/store_file_download?buid=15017&uin=1476761044&dir_path=\/&name=18_11_24_99bec295fa9865d3036276723af33401_5495.jpg"},{"pid":"5496","width":999,"height":1413,"url":"http:\/\/ac.tc.qq.com\/store_file_download?buid=15017&uin=1476761044&dir_path=\/&name=18_11_24_277546292f55010206b4b49b7d478d52_5496.jpg"},{"pid":"5497","width":999,"height":1413,"url":"http:\/\/ac.tc.qq.com\/store_file_download?buid=15017&uin=1476761044&dir_path=\/&name=18_11_24_86a2452747f0a3c2594a21a0b703a328_5497.jpg"},{"pid":"5498","width":999,"height":1413,"url":"http:\/\/ac.tc.qq.com\/store_file_download?buid=15017&uin=1476761052&dir_path=\/&name=18_11_24_c505c21dd023f5919a4c9931c0160fc9_5498.jpg"},{"pid":"5499","width":999,"height":1413,"url":"http:\/\/ac.tc.qq.com\/store_file_download?buid=15017&uin=1476761052&dir_path=\/&name=18_11_24_fd2db18d8bddad3e7c4f89ebf06b3013_5499.jpg"},{"pid":"5500","width":999,"height":1413,"url":"http:\/\/ac.tc.qq.com\/store_file_download?buid=15017&uin=1476761052&dir_path=\/&name=18_11_24_e2e9056a83953bc64c64ad45c3d4a519_5500.jpg"},{"pid":"5501","width":999,"height":1413,"url":"http:\/\/ac.tc.qq.com\/store_file_download?buid=15017&uin=1476761052&dir_path=\/&name=18_11_24_85b5dc2604d35f576e63fdca3a854643_5501.jpg"},{"pid":"5502","width":999,"height":1413,"url":"http:\/\/ac.tc.qq.com\/store_file_download?buid=15017&uin=1476761052&dir_path=\/&name=18_11_24_5a3270571b12df5aa97ac8daadd7af9c_5502.jpg"},{"pid":"5503","width":999,"height":1413,"url":"http:\/\/ac.tc.qq.com\/store_file_download?buid=15017&uin=1476761060&dir_path=\/&name=18_11_24_8921da527c7610f601adce5a9b096493_5503.jpg"},{"pid":"5504","width":999,"height":1413,"url":"http:\/\/ac.tc.qq.com\/store_file_download?buid=15017&uin=1476761060&dir_path=\/&name=18_11_24_ab776713de3f011a1fec6771e69e506d_5504.jpg"},{"pid":"5505","width":999,"height":1413,"url":"http:\/\/ac.tc.qq.com\/store_file_download?buid=15017&uin=1476761060&dir_path=\/&name=18_11_24_67eb2055ffab5e8c00ba8951cdb96134_5505.jpg"},{"pid":"5506","width":999,"height":1413,"url":"http:\/\/ac.tc.qq.com\/store_file_download?buid=15017&uin=1476761060&dir_path=\/&name=18_11_24_a8de37aca8869d5a707b503831357d4b_5506.jpg"},{"pid":"5507","width":999,"height":1413,"url":"http:\/\/ac.tc.qq.com\/store_file_download?buid=15017&uin=1476761060&dir_path=\/&name=18_11_24_f509ed773e7586653c3436ce86e478d4_5507.jpg"},{"pid":"5508","width":999,"height":1413,"url":"http:\/\/ac.tc.qq.com\/store_file_download?buid=15017&uin=1476761060&dir_path=\/&name=18_11_24_7a4a7442b21dd32b9b5ca142921fe459_5508.jpg"},{"pid":"5509","width":999,"height":1413,"url":"http:\/\/ac.tc.qq.com\/store_file_download?buid=15017&uin=1476761067&dir_path=\/&name=18_11_24_d9c2c5a7e602b77da64bff2ce0f1c55f_5509.jpg"},{"pid":"5510","width":999,"height":1413,"url":"http:\/\/ac.tc.qq.com\/store_file_download?buid=15017&uin=1476761067&dir_path=\/&name=18_11_24_2c94a7c093cbf3d50c3a27801e2fc52c_5510.jpg"},{"pid":"5511","width":999,"height":1413,"url":"http:\/\/ac.tc.qq.com\/store_file_download?buid=15017&uin=1476761067&dir_path=\/&name=18_11_24_9e3140d40748a3af95a6f89007cefc44_5511.jpg"},{"pid":"5512","width":999,"height":1413,"url":"http:\/\/ac.tc.qq.com\/store_file_download?buid=15017&uin=1476761067&dir_path=\/&name=18_11_24_f22cbf0e947a6d38dee39bbc4e49dde3_5512.jpg"},{"pid":"5513","width":999,"height":1413,"url":"http:\/\/ac.tc.qq.com\/store_file_download?buid=15017&uin=1476761075&dir_path=\/&name=18_11_24_ebf9416ef12d57d4bce61c0b6f99a1cb_5513.jpg"},{"pid":"5514","width":999,"height":1413,"url":"http:\/\/ac.tc.qq.com\/store_file_download?buid=15017&uin=1476761075&dir_path=\/&name=18_11_24_72b2f98b9314fb700b7b0230f9573529_5514.jpg"},{"pid":"5515","width":999,"height":1413,"url":"http:\/\/ac.tc.qq.com\/store_file_download?buid=15017&uin=1476761075&dir_path=\/&name=18_11_24_bd2797947e5153ea3978a10d63b54ebb_5515.jpg"},{"pid":"5516","width":999,"height":1413,"url":"http:\/\/ac.tc.qq.com\/store_file_download?buid=15017&uin=1476761075&dir_path=\/&name=18_11_24_6173daaac55095086a13637e18a3bbc1_5516.jpg"},{"pid":"7110","width":999,"height":1413,"url":"http:\/\/ac.tc.qq.com\/store_file_download?buid=15017&uin=1487242311&dir_path=\/&name=16_18_51_5039e58d1b8b205689233694ddae3db2_7110.jpg"}],"ads":{"top":{"title":"\u4e1e\u76f8\u62d0\u8d70\u6211\u7687\u4e0a","pic":"https:\/\/manhua.qpic.cn\/manhua_detail\/0\/01_09_16_05c9ade3521806a6a51b6802331da611.jpg\/0","url":"http:\/\/ac.qq.com\/Comic\/comicInfo\/id\/552624","width":"650","height":"110"},"left":[],"bottom":{"title":"\u72fc\u4eba\u5f52\u6765","pic":"https:\/\/manhua.qpic.cn\/manhua_detail\/0\/28_10_16_27a3957b57551122c87b85782eef6662.jpg\/0","url":"http:\/\/ac.qq.com\/ComicView\/index\/id\/543396\/cid\/1","width":"650","height":"110"}},"artist":{"avatar":"http:\/\/q1.qlogo.cn\/g?b=qq&k=ntTXtb5qjtudgfkN8DAheQ&s=640&t=1483308078","nick":"\u96f6\u76df-","uinCrypt":"a1QvM0w0K0lNNnVDcm0rQ0FYVmI0UT09"}}

比以前爬取移动端页面还简单点。

f
fengx07
回复 @Feng_Yu : 非常感谢大神耐心回答!
Feng_Yu
Feng_Yu
回复 @fengx07 : 我说过了啊,你在页面打断点,观察右边的变量列表就行了。就能找到是哪段代码解析了这段BASE64,只看这一部分代码的算法就能看出来了。尽管我不怎么懂js,不过大体上算法还是能看出来了,有函数调用就google一下函数的作用就看懂了。
f
fengx07
感谢大神,请问您是如何发现移除第一个字节就能够decode成一个json格式的数据呢? 这难道就是传说中程序员的直觉吗!
0
E
Et2000a
大神,膜拜。
0
努力代码工
努力代码工

可以的,有这耐心

返回顶部
顶部