Всякий раз, когда я использую ссылку captions and transcription
в переменной start_urls
, она дает мне цену caption
как в заголовках, так и в переменной транскрипции и снова дает мне цену transcription
в обеих переменных. Почему и как решить эту проблему?
import scrapy
from .. items import FetchingItem
class SiteFetching(scrapy.Spider):
name = 'Site'
start_urls = ['https://www.rev.com/freelancers/captions',
'https://www.rev.com/freelancers/transcription']
def parse(self, response):
items = FetchingItem()
Transcription_price = response.css('#middle-benefit .mt1::text').extract()
Caption_price = response.css('#middle-benefit .mt1::text').extract()
items['Transcription_price'] = Transcription_price
items['Caption_price'] = Caption_price
yield items