标签:基本知识 lin sel 链接 elf replace highlight pytho call
rules = ( Rule(LinkExtractor(allow=r‘/films/\d+‘),process_links=‘deal_links‘ ,callback=‘parse_maoyan‘,follow=False), ) def deal_links(self,links): for link in links: link.url = link.url.replace("A","B") return links
标签:基本知识 lin sel 链接 elf replace highlight pytho call
原文地址:https://www.cnblogs.com/shuimohei/p/10401057.html