V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
推荐学习书目
Learn Python the Hard Way
Python Sites
PyPI - Python Package Index
http://diveintopython.org/toc/index.html
Pocoo
值得关注的项目
PyPy
Celery
Jinja2
Read the Docs
gevent
pyenv
virtualenv
Stackless Python
Beautiful Soup
结巴中文分词
Green Unicorn
Sentry
Shovel
Pyflakes
pytest
Python 编程
pep8 Checker
Styles
PEP 8
Google Python Style Guide
Code Style from The Hitchhiker's Guide
linhanqiu
V2EX  ›  Python

大神,这里有个抓包问题请你看看

  •  
  •   linhanqiu · 2018-03-01 21:46:58 +08:00 · 2132 次点击
    这是一个创建于 2488 天前的主题,其中的信息可能已经有所发展或是发生改变。

    我抓了在艺 APP 的逛画廊,想把里面的作品抓下来,但是结果都是这样的,没有一个接口是传回多少数据的,这样一条一条数据我该怎么抓

    Result Protocol Host URL Body Caching Content-Type Process Comments Custom

    1244 200 HTTPS img.zai-art.com /zaiart_article%2F18ac0c5ae748eedbf12b6b6787e2e5fa.png?imageView2/0/h/276/format/jpg 11,536 public, max-age=2; Expires: Thu, 01 Mar 2018 13:44:31 GMT image/jpeg 1245 200 HTTPS img.zai-art.com /zaiart_article%2F22eb26e0a47f239c18508c55902318c7.jpeg?imageView2/0/h/276/format/jpg 16,470 public, max-age=2; Expires: Thu, 01 Mar 2018 13:44:31 GMT image/jpeg 1246 200 HTTPS img.zai-art.com /zaiart_article%2F35a22f82c5dc60b8e113494722a247ed.jpeg?imageView2/0/h/276/format/jpg 17,449 public, max-age=2; Expires: Thu, 01 Mar 2018 13:44:32 GMT image/jpeg 1247 200 HTTPS img.zai-art.com /zaiart_article%2Fecab8276406461f5809a49866dbc22c9.jpeg?imageView2/0/h/276/format/jpg 21,509 public, max-age=2; Expires: Thu, 01 Mar 2018 13:44:31 GMT image/jpeg 1248 200 HTTPS img.zai-art.com /zaiart_article%2F172f06ade668894e05386855e05f9c4a.jpeg?imageView2/0/h/276/format/jpg 33,218 public, max-age=2; Expires: Thu, 01 Mar 2018 13:44:31 GMT image/jpeg 1249 200 HTTP Tunnel to img.zai-art.com:443 0 1250 200 HTTPS img.zai-art.com /627495748F19A45641DA0E23AA735008/138004DCF123E5DCB0530051276A89DD.jpg?imageView2/0/h/276 8,484 public, max-age=2; Expires: Thu, 01 Mar 2018 13:44:32 GMT image/jpeg 1251 200 HTTPS img.zai-art.com /zaiart_article%2F375d727c60f20082d3af7523fd3a2cc5.jpeg?imageView2/0/h/276/format/jpg 12,317 public, max-age=2; Expires: Thu, 01 Mar 2018 13:44:33 GMT image/jpeg 1252 200 HTTPS img.zai-art.com /zaiart_article%2F0a3e9f83edde2f0528892b757f50c317.jpeg?imageView2/0/h/276/format/jpg 39,138 public, max-age=2; Expires: Thu, 01 Mar 2018 13:44:33 GMT image/jpeg 1253 200 HTTPS img.zai-art.com /1061E38790CC7E6B4F142762A05BB845/5DE8B0B70F8723B9239775F8BBCD4B9C?imageView2/0/h/276/format/jpg 19,826 public, max-age=2; Expires: Thu, 01 Mar 2018 13:44:33 GMT image/jpeg 1254 200 HTTPS img.zai-art.com /zaiart_article%2F9481693e5e522b120cd525f0c6996e48.jpeg?imageView2/0/h/276/format/jpg 37,565 public, max-age=2; Expires: Thu, 01 Mar 2018 13:44:34 GMT image/jpeg 1255 200 HTTPS img.zai-art.com /zaiart_article%2Fbe3c6a244d8032df89a03856dc1af230.jpeg?imageView2/0/h/276/format/jpg 15,339 public, max-age=2; Expires: Thu, 01 Mar 2018 13:44:35 GMT image/jpeg 1256 200 HTTPS img.zai-art.com /zaiart_article%2F6b462f4b55c8681afb9bf20c62577f54.png?imageView2/0/h/276/format/jpg 16,398 public, max-age=2; Expires: Thu, 01 Mar 2018 13:44:35 GMT image/jpeg

    3 条回复    2018-03-01 23:07:25 +08:00
    ysc3839
        1
    ysc3839  
       2018-03-01 22:36:54 +08:00
    "没有一个接口是传回多少数据的" 这是什么意思?
    qiqico
        2
    qiqico  
       2018-03-01 22:55:57 +08:00
    / 被 escape 成了%2F,请求 URL 没拼对吧
    opengps
        3
    opengps  
       2018-03-01 23:07:25 +08:00
    img.zai-art.com/zaiart_article%2F18ac0c5ae748eedbf12b6b6787e2e5fa.png 是一张图片,用正则匹配 img.zai-art.com /zaiart_article 的出现次数即可得到当前页面抓取的图片数量。
    但问题是图片命名规则确实不是自增类具有明显规律的,你难不成要遍历 18ac0c5ae748eedbf12b6b6787e2e5fa 这种庞大的运算?
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   3665 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 25ms · UTC 04:31 · PVG 12:31 · LAX 20:31 · JFK 23:31
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.