Size: a a a

2020 September 08

YB

Yaswanth Bangaru in Scrapy
Okay, let me try that
источник

AR

Andrey Rahmatullin in Scrapy
yup, reading the actual error message would be useful, as " it throws as error " 'object, got %s' % type(text).name)" " is incorrect
источник

YB

Yaswanth Bangaru in Scrapy
I used start urls with the home page so that Scrapy would fetch the cookies
источник

YB

Yaswanth Bangaru in Scrapy
Even after making everything into strings, the spider fails to fetch the right url in the second url
источник

YB

Yaswanth Bangaru in Scrapy
But thanks anyways, it solved one error
источник

i

i in Scrapy
btw FormRequest should get pretty most fields for you, you should set only fields, that you need to change.
источник

YB

Yaswanth Bangaru in Scrapy
Can you please elaborate? from my observation, value of ts key in my_data dictionary on my script changes
источник

YB

Yaswanth Bangaru in Scrapy
I believe I need to keep the formdata as it is
источник

i

i in Scrapy
You should use fromresponse
источник

YB

Yaswanth Bangaru in Scrapy
Oh, is it?
источник

YB

Yaswanth Bangaru in Scrapy
That would need a lot of changes I believe
источник

i

i in Scrapy
No, it will need less code from you, but I can't find docs yet somewhy(
источник

YB

Yaswanth Bangaru in Scrapy
But how would I get cookies if I start off with this link directly?
источник

YB

Yaswanth Bangaru in Scrapy
Because formrequest.from response needs to be passed with a response
источник

i

i in Scrapy
You should get this link, it ok, you should then call smth like fromrequest.formresponse and it will gather all other fields for you
источник

i

i in Scrapy
источник

i

i in Scrapy
Here, you anyways need to made request for cookies, so then you pass this answer to fromresponse formrequest, and got most of needed fields and no need to set them manually. In this tutorial case there maybe a lots of fields filled by scrapy itself
источник

i

i in Scrapy
And you set only login and password
источник

YB

Yaswanth Bangaru in Scrapy
Okay, but where do I specify the xhr response json that I'm trying to download?
источник

i

i in Scrapy
источник