Start a new topic

No 'Access-Control-Allow-Origin' header is present on the requested resource.

I am receiving a 500 error when trying to access the API. It is saying "No 'Access-Control-Allow-Origin' header is present on the requested resource."


Below is the AJAX code I am using to start a job. Anything incorrect? The static site is running on an s3 bucket


$.ajax({
        url: "https://app.scrapinghub.com/jobs/run.json",
        type: "POST",
        data: { 
            APIKEY:"APIKEY",
            project:"Test_Florida",
            spider:"florida",
        }
});

 

Additionally, is there any way to catch the response when the spider is completed? I would like to update a list on our website once it is completed. The spider takes ~10 seconds as it is just scanning one page.

Login to post a comment