scrapy吧 关注:365贴子:558
  • 1回复贴,共1

scrapy框架 response.xpath返回r为什么为空列表?

取消只看楼主收藏回复

import scrapy
class FirstSpider(scrapy.Spider):
name = 'first'
# allowed_domains = ['careers.tencent.com']
start_urls = ['https://careers.tencent.com/search.html?pcid=40001']
def parse(self, response):
r = response.xpath('//div[@class="correlation-degree"]/div').extract()
print(r)


1楼2021-08-25 18:30回复
    有哪位大神指教哈!


    2楼2021-08-25 18:33
    回复