1

I'm making a website that gets the HTML for a specific list of pc parts from pc part picker and then scrapes it off the page and does some stuff with that information.

But I keep running into the error,

Access to fetch at 'https://pcpartpicker.com/list/DHhX4n' from origin 'http://mywebsite.com' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.

I know that it means that Cors is disabled on the web server but is there any way around it?

I just need the HTML that you get when you manually enter the address. Any method is appreciated.

This is my code.

var list = "https://pcpartpicker.com/list/DHhX4n";
fetch(list,{
            method: "GET"
        }).then(response => response.text())
        .then(function(response){
            // Scrape HTML
        })
        .catch(error =>{
            console.log(error)
        })

0 Answers0