Answer the question
In order to leave comments, you need to log in
How to teach phantomjs and python to communicate?
There are a dozen python parsers (using grab ) that parse several sites and save it all to the database, and display the parsed content in Django. I wanted to rewrite part of the parsers to phantomjs, but ran into saving the results in the database.
I really would not want to write to the database directly from phantomjs.
How can you teach python and phantomjs to communicate with each other? For example, there is a python script that launches several phantomjs parsers, and they give it parsed content, which the script processes and puts into the database.
Answer the question
In order to leave comments, you need to log in
As an option, make a queue based on redis/rabbit.
And for what purpose do you want to transfer part of the parsers to the phantom?
You can make a "proxy" on the phantom and access it via http from python - in order to receive already assembled pages
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question