I've been trying to scrapy the following Website but with the currency changed to 'SAR' from the upper left settings form , i tried sending a scrapy request like this:
r = Request(url='https://www.mooda.com/en/', cookies=[{'name': 'currency',
'value': 'SAR',
'domain': '.www.mooda.com',
'path': '/'}, {'name':'country','value':'SA','domain': '.www.mooda.com','path':'/'}],dont_filter=True)
and i still get the price as EG
In [10]: response.css('.price').xpath('text()').extract()
Out[10]:
[u'1,957 EG\xa3',
u'3,736 EG\xa3',
u'2,802 EG\xa3',
u'10,380 EG\xa3',
u'1,823 EG\xa3']
i have also tried to send a post request with the Specified form data like this :
from scrapy.http.request.form import FormRequest
url = 'https://www.mooda.com/en/'
r = FormRequest(url=url,formdata={'selectCurrency':'https://www.mooda.com/en/directory/currency/switch/currency/SAR/uenc/aHR0cHM6Ly93d3cubW9vZGEuY29tL2VuLw,,/'})
fetch(r)
still it would never work ,also tried to use FormRequest.from_response() but it would never work , id really like some advices ,im new to scrapy form requests , if anyone could help , i'd be thankful