我是初学scrapy,自学,所以困难重重,遇到疑问。
scrapy 框架中需要手写的spider爬虫中,给出一个“start_urls”会得出“response”,我看到的例子中,这个"response"一般都使用response.xpath()或者response.css()的方法。
请问:可以对response使用正则表达式吗?譬如:re.findall('xxxxxx',response,re.S) ?
可以吗?
谢谢大家!
scrapy 框架中需要手写的spider爬虫中,给出一个“start_urls”会得出“response”,我看到的例子中,这个"response"一般都使用response.xpath()或者response.css()的方法。
请问:可以对response使用正则表达式吗?譬如:re.findall('xxxxxx',response,re.S) ?
可以吗?
谢谢大家!