Answer the question
In order to leave comments, you need to log in
How to edit incoming HTTP traffic, linux?
Hello.
Wrote a small Javascript parser under Phantomjs. Works exactly as it should, but there is a small problem. Randomly, on some pages, an HTML code appears, which, when the page is loaded, launches a JS code, and on this JS code, Phantomjs starts loading the percentage by 100% and is very slow. In this case, the onLoad event is not called.
I have already tried everything to cut out an objectionable piece of code from the page using Phantomjs before freezing, but nothing worked. In this regard, the idea came up to intercept all incoming packets, edit their contents if necessary, and pass them on to Phfntomjs. How can this be done? The traffic is compressed with gzip.
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question