S
S
Skylead2016-10-07 13:11:02
Python
Skylead, 2016-10-07 13:11:02

Selenium analogs for python?

Greetings.
Are there any faster alternatives to selenium?
The task is to parse the page where the content is loaded via javascript.
You also need to click on the elements.
Found several engines:

  • https://github.com/makinacorpus/spynner
  • PhantomJS - can it be controlled from outside the selenium panel?
  • PyQt - suitable for these purposes?

What is the most suitable?

Answer the question

In order to leave comments, you need to log in

5 answer(s)
Q
qlkvg, 2016-10-07
@qlkvg

and what selenium does not suit? it is in fact - a strapping over the browser, there is nothing special to blunt. Another question is that the web is now heavy. my selenium+phantomjs with disabled pictures works quite fast.
I didn’t write anything on PyQt + webkit, but someone else’s project left a bad impression (although it’s quite possible that the problem was in the developer’s hands, and not webkit’e)

D
Dmitry Eremin, 2016-10-07
@EreminD

Yes, selenium is not the most suitable
here. Here is an example of reasoning on your topic: https://habrahabr.ru/post/280238/
Well, a whole book about this ( shop.oreilly.com/product/0636920034391.do)

S
shamanovski, 2016-10-07
@shamanovski

Use the dryscrape library. It uses webkit to compute the js and returns the result to you along with the markup

D
Dimonchik, 2016-10-08
@dimonchik2013

https://blog.scrapinghub.com/2015/03/02/handling-j...
but often the task with js is solved with the usual

A
Alexey Sundukov, 2016-11-12
@alekciy

I'll add a little caveat though. It is necessary to distinguish between 1) the speed of processing one page 2) the speed of processing X pages per second. Usually, the second is understood as "faster", because. in practice, we have a lot of pages and we want to parse them as quickly as possible. So, if the task is to raise exactly point 2, then you can do it on selenium, you just have to run a whole cluster of nodes. Which usually translates into large resource requirements. And if selenium suits everything and there are such resources, then it makes sense to stay within its framework.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question