S
S
sddvxd2017-01-29 23:53:58
Python
sddvxd, 2017-01-29 23:53:58

How to process javascript?

Good day
While studying the requests library, I came across a problem: you can’t process js on the page.
Let’s say there is a captcha on the page, you won’t be able to get a form with it using requests and bs - instead of the form it will be “You don’t have JS enabled, enable it in the browser settings.. .."
Searching on the Internet, I came across selenium, but it opens browser windows, which I do not need at all. I
just need to load js without resorting to using a browser
. Tell me, what are your thoughts on this

Answer the question

In order to leave comments, you need to log in

1 answer(s)
N
nirvimel, 2017-01-30
@sddvxd

  • An easy way: PhantomJS instead of a browser for the same selenium.
  • The Way of Real Men: Read js (just get the idea) and rewrite it in python with regular requests (aiohttp is better). And no browsers and seleniums.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question