How to send JavaScript and Cookies Enabled in Scrapy?

后端 未结 3 1014
深忆病人
深忆病人 2021-02-08 19:57

I am scraping a website using Scrapy which require cooking and java-script to be enabled. I don\'t think I will have to actually process javascript. All I need is to pretend as

3条回答
  •  Happy的楠姐
    2021-02-08 20:03

    AFAIK, there is no a universal solution. You have to debug the site, to see how it determines that Javascript is not supported/enabled by your client.

    I don't think the server looks at X-JAVASCRIPT-ENABLED header. Maybe there is a cookie set by Javascript when the page loads in a real javascript enabled browser? Maybe the server looks at user-agent header?

    See also this response.

提交回复
热议问题