2024-09-29 04:18:48 发布
网友
我使用CrawlSpider和{}对链接进行爬网。在
CrawlSpider
我该如何向LinkExtractor找到的链接追加参数?我想将'?pag_sortorder=0&pag_perPage=999'添加到LinkExtractor提取的每个链接。在
LinkExtractor
'?pag_sortorder=0&pag_perPage=999'
这是使用^{} argument的完美用例:
from scrapy.contrib.linkextractors import LinkExtractor addition = "?pag_sortorder=0&pag_perPage=999" LinkExtractor(process_value=lambda x: x + addition)
这是使用^{} argument 的完美用例:
相关问题 更多 >
编程相关推荐