D
D
difficultnicknameforcommu2018-09-28 19:01:21
Python
difficultnicknameforcommu, 2018-09-28 19:01:21

How to proxy a website in python?

Hello. Nginx has a proxy_pass setting to proxy traffic to the desired host. Is it possible to implement something like this in python. Or I use the same nginx, but with preprocessing (html) documents. Everything should work with support for user sessions.
There is site A and I need to proxy it to another domain with a change in html.
I see it this way: Nginx (receives requests) -> python (processes html) -> then the user sees the final html.
Where to dig? What to read ?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Dimonchik, 2018-09-28
@dimonchik2013

you can mitm proxy
you can use lxml (yes, it not only parses, but also changes the house-tree)

A
Andrey Burov, 2018-09-29
@BuriK666

https://www.geeksforgeeks.org/creating-a-proxy-web...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question