import scrapy
class TencentSpider(scrapy.Spider):
name = 'tencent'
allowed_domains = ['tencent.cn']
start_urls = ['https://careers.tencent.com/search.html']
def parse(self, response):
node_list = response.xpath('//div[@class="recruit-list"]')
print(len(node_list))
为什么这个代码 提取 不到任何的信息 终端运行都是为0 求解答
你试试这个xpath
node_list = response.xpath('/html/body/div/div[4]/div[3]/div[2]/div[2]/div/div')