def parse_item(self, response):\n item = {}\n self.namePrint(response)\n self.handle_response_to_item(response)\n return item\n \ndef namePrint(self, response):\n print('name:' + response.url)\n\n# 创建类的实例\ninstance = ClassName()\n# 调用parse_item方法\ninstance.parse_item(response)

Python爬虫:namePrint函数未打印内容的解决方法

原文地址: https://www.cveoy.top/t/topic/p6Wm 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录