Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
555 views
in Technique[技术] by (71.8m points)

web scraping - Scrapy, Aliexpress returning none for prices

Everytime I try to run this the price returns as none, why? I'm new to this.

import scrapy

class AliSpiderSpider(scrapy.Spider):
    name = 'ali_spider'
    allowed_domains = ['www.aliexpress.com']
    start_urls = ['https://www.aliexpress.com']

    def parse(self, response):
        yield {
                'current_price': response.xpath('//*[@id="redesign-flash-deals"]/div[2]/ul/li[1]/a/div/div[2]/span[1]/text()').get()
            }
question from:https://stackoverflow.com/questions/65839453/scrapy-aliexpress-returning-none-for-prices

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...