I'm developping a scraper to get some data from youtube videos. I am from Spain and I am getting the songs that are present in a video, my code starts like this:
url = f'https://www.youtube.com/watch?v={vid}'
page = requests.get(url).text
The main problem is that later I compare the text in the page with some Spanish strings, like Con licencia cedida a YouTube por
. But now, I'm getting this text in Italian, like Concesso in licenza a YouTube da
. Why? I've realized that I had youtube location in Italiy, I have changed to Spain and I have delete all the pycache folders from the project and from the request module, but it continues getting the Italian version. Any clue?