推荐学习书目
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
redhatping
V2EX  ›  Python

javascript 分页问题下的爬虫思路怎么解决?

  •  
  •   redhatping · Jul 20, 2016 · 3230 views
    This topic created in 3613 days ago, the information mentioned may be changed or developed.
    主页面:http://www.smeimdf.org.cn/news/notify.jsp?searchType=1
    爬虫目标: 查询各个地区的企业.

    遇到的问题:

    1,无论查询什么,生成的页面都是: http://www.smeimdf.org.cn/news/searchEntpAudit.jsp (链接中没有参数),
    爬虫如何抓取呢

    2.查询后的页面-- 如 javascript 下的分页.
    爬虫怎么抓取呢
    6 replies    2016-07-21 11:21:10 +08:00
    3dwelcome
        1
    3dwelcome  
       Jul 20, 2016 via Android
    看了下、是 form post 提交、改一下页面 id 就可以了吧。
    lxy
        2
    lxy  
       Jul 20, 2016   ❤️ 1
    post 提交,页数参数应该是 cpf.cpage 。浏览器按 F12 看一下请求的地址和提交的内容。
    redhatping
        3
    redhatping  
    OP
       Jul 20, 2016
    @3dwelcome 1. ( 网站数据 POST 提交-- 数据库查询--生成页面),抓取 POST action="searchEntpAudit.jsp" 就可以了嘛?

    2. 分页怎么办呢?
    redhatping
        4
    redhatping  
    OP
       Jul 20, 2016
    @lxy 好的, 我抓取看看,谢谢.
    miaotaizi
        5
    miaotaizi  
       Jul 21, 2016
    他页面上不有分页信息么, 这都做不到?
    ZnZt
        6
    ZnZt  
       Jul 21, 2016
    直接抓接口数据
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   3304 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 40ms · UTC 12:04 · PVG 20:04 · LAX 05:04 · JFK 08:04
    ♥ Do have faith in what you're doing.