Small Scrapy Python Issue?

تبليغ
سؤال

يرجى شرح بإيجاز لمإذا تشعر أنك ينبغي الإبلاغ عن هذا السؤال.

تبليغ
‎إلغاء

Can you help me?

I’m Trying to Bull the Price and the Subrace

From 0 – 3000

Ex.

myipc.io/2

myipc.io/15

myipc.io/3

From This site: https://myipc.io/1

And I get a list of nothing.

Here is the spider:

import scrapy
from ..items import MyipcItem

class MyipcSpider(scrapy.Spider):
name = ‘ipc’
start_urls = [‘https://myipc.io/1’]

def parse(self, response):
items = MyipcItem()

div1= response.css(‘.css-11yaebc’)
div2= response.css(‘.css-1ontqvh’)

price = div1.css(‘.css-1p8hbfp:nth-child(1) .css-toom0n::text’).extract()
subrace= div2.css(‘.css-xc4uno:nth-child(2) .css-1a29ebg’).extract()

items[‘name’] = subrace
items[‘price’]= price

yield items

Here is The items.py

import scrapy

class MyipcItem(scrapy.Item):
name = scrapy.Field()
price= scrapy.Field()
pass

Finally Thank you in advance.✋💖💖

‫أضف إجابة

تصفح
تصفح

مجهول يجيب