Closed SteeledSlagle13 closed 4 years ago
Does this always happen? Or is it random?
I don't think this is an issue from my library, but rather an issue from the http request & response.
I checked https://www.youtube.com/watch?v=84N7ZOnXB6 and it's an unavailable video, try other valid video ID and see if it still return 302.
If its still returning 302, try creating a simple script to send a request to youtube from your aws and check if still return 302. You can use node-fetch
Install with npm i node-fetch
then in your script
const fetch = require("node-fetch");
const videoId = "84N7ZOnXB6"; // Try to use invalid and valid video ID to see if it gives the same result
fetch(`https://www.youtube.com/watch?v=${videoId}`)
.then((res) => {
console.log(res.status); // Check what's the status code
})
i think it is from a diff lib ill try that fetch tho!
it may have been from doing a search and then attepmting to download the first video.... which was a paid video XD
whoops
i regened my ip so ill keep testing it!!!
is there a way to see if the video is a paid video?
I will look into it, for now, getting invalid / premium video id and if there's a scraping error, it will throw an error.
Describe the bug Getting an error 302 after running a test script with 1 video search on an aws instance
To Reproduce create aws ec2 instance run
Expected behavior should return the video information
Screenshots If applicable, add screenshots to help explain your problem.
Additional context im running fine on my windows pc but from my ec2 instance in aws its getting this error