score:1

This is a restriction made by the browser for security reasons when you try to access content in some domain from another domain. You overcome this, you need to set the following in your header

Access-Control-Request-Method
Access-Control-Request-Headers

Many sites restrict CORS. The best way to achieve your goal is to make your python server as a proxy. See the example.

//Request from the client/browser

http://localhost:8000/loadsite?q=https%3A%2F%2Fexample.com

//In your server

 1. Handle the request
 2. Get the query param(url of the website)
 3. Fetch it using your python server
 4. Return the fetching data to the client.

This should work.


Related Query

More Query from same tag