A
A
Alex F2017-11-16 09:53:22
Python
Alex F, 2017-11-16 09:53:22

How to pass in headers that javascript is enabled?

Welcome all!
How to pass in headers that javascript is enabled?
We have:

headers
headers = {
  'User-agent': 'Mozilla/5.0 (X11; Linux x86_64) Gecko/20100101 Firefox/45.0',
  'Accept': 'text/html,text/javascript, application/xhtml+xml,application/xml;*/*;q=0.9,*/*;q=0.8',
  'Accept-language': 'ru,en-US;q=0.7,en;q=0.3',
  'Accept-encoding': 'gzip, deflate',
  'Dnt': '1',
  'Connection': 'keep-alive',
  'Cache-Control' : "max-age=0",
  'Cookie' : "_gauges_unique_month=1; _gauges_unique_year=1; _gauges_unique=1",
  'Upgrade-insecure-requests': '1',
  'X-DNS-Prefetch-Control': 'on',
  'Cf-Visitor': '{"scheme":"https"}',
  'X-Forwarded-Proto': 'https',
  'Referer': 'http://kstr.megafon.ru/'
}

The output is:
Exhaust screenshot with my headers
4831eb19_o.png

And it needs to be:
Browser exhaust screenshot
f80d81d1_o.png

Thank you.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Roman Kitaev, 2017-11-16
@delvin-fil

There is no header that says there is js. There is a js engine on the client, where the code can be executed and say that js is enabled. Use selenium.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question