# -*- coding: utf-8 -*- # import re import scrapy class HgjieshuSpider(scrapy.Spider): name = 'hgjieshu' allowed_domains = ['hg3535z.com'] start_urls = ['https://hg3535z.com/zh-cn/info-centre/sportsbook-info/results/1/normal/1'] def parse(self, response): # a = response.xpath('//*[@id="dt-cmp-66148"]/div[1]/div[3]/span[3]/text()')[0].extract_first() if response.status == 200: tema = response.xpath('//div[@class="rt-event"]//span[@class="pt"]/text()') # print(tema) aa = [i.extract() for i in tema ] # b = response.xpath('//div[@class="rt-ft "]/text()') #比分 b = response.xpath('//div[contains(@class,"rt-ft")]')#比分')]/text()') #比分 # print(b) # for i in tema: # print(i.extract()) # c = i.xpath('//div/text()') # # yield c # i = i.extract() # print(i) # aa = [(x, y, z.extract().split('">')[1].split('')[1].split('