• 请不要在回答技术问题时复制粘贴 AI 生成的内容
zdnyp
V2EX  ›  程序员

scrapy 的 crawlspider 中 deny 的设置无效?

  •  
  •   zdnyp · Jan 2, 2019 · 2127 views
    This topic created in 2713 days ago, the information mentioned may be changed or developed.

    在 Rule 中设置了 deny,但是并未生效:

    代码如下: '123123':( Rule(LinkExtractor(allow='\d+-\d+-\d+/.*?-.*?.shtml', deny=('http://search.******.com.cn/.*?')), callback='parse_item', follow=True), Rule(LinkExtractor(allow='a[href^="http"]',deny_domains=('http://auto.******.com.cn')), follow=True) )

    运行的时候还是有 debug 禁止的链接: 是这样插入图片么

    Supplement 1  ·  Jan 2, 2019
    没人来消灭一下零回复么...
    No Comments Yet
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   1181 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 25ms · UTC 23:41 · PVG 07:41 · LAX 16:41 · JFK 19:41
    ♥ Do have faith in what you're doing.