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

crawlspider 爬取全网站原网站信息不全,目前怀疑主要是相对链接没有被转化为绝对链接

  •  
  •   xiushenbuhuihui · Jun 14, 2019 · 1965 views
    This topic created in 2667 days ago, the information mentioned may be changed or developed.
    您好,我把我的问题给你详细描述一下,请您帮我解决一下。
    用的是 crawlspider 爬取乐融商城全部的网站源代码,但是爬取到精选配件页面(全部分类选项里面)时,由于商品(“比如:乐视蓝牙耳机”)的链接只是相对的,结果导致无法爬取商品页面源代码
    z1421012325
        1
    z1421012325  
       Jun 17, 2019
    scrapy 框架的话有个方法 response.urljoin(你提取出来的链接) 可以补全
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   2320 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 47ms · UTC 08:01 · PVG 16:01 · LAX 01:01 · JFK 04:01
    ♥ Do have faith in what you're doing.