A specific site is returning a different response on python and in chrome

前端 未结 1 537
耶瑟儿~
耶瑟儿~ 2021-01-29 00:26

I am trying to access a specific site using python, and no matter which lib I use I just can\'t seem to access it.

I have tried Selenium+PhantomJS, I have tried requests

相关标签:
1条回答
  • 2021-01-29 00:53

    It works for me if I set a bunch of headers including sending a cookie.

    curl -H "Cookie:rbzid=d29SMXE1Rktrdm5kS2x0YW5EdVZwUzNpYVhWdUlJSndlVzEvUU9vWG5OU2dRSVNnWTc3TWYwaHN4V2REVGJyNFBMSFl1bXErMGFLNXNtUGxVb0ZwS3dVRDRhajEwczFMMmE3cUc1blBmaTEzeFZFWGhrbHgrUXhNeHRhZnhWNjBib1pTenM5bjFvOUhVRVoxOTNGRHBYQXQwVzVsYXdSSXliME5LeUZjU0Rhb2tHa09ycUNVYmJyOUVjMERJN3daaUlFUGhwUHpvT0dDblcwU0wwMEM3NlJZRGw1K1pXZ2NKNkJRTWhvNUtaZz1AQEAxOTVAQEAtNjY2NjY2NjYwNjA-" -H "Accept-Language: en-US,en;q=0.8,ja;q=0.6" -H "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8" -A "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36" http://www.yesplanet.co.il/presentationsJSON
    

    Not sure which other headers are important

    I looked at what headers chrome was sending by checking the network panel i the dev tools

    From that I can also see chrome made 2 requests

    0 讨论(0)
提交回复
热议问题