YAPO
YAPO copied to clipboard
Freeones scraper not working
The freeones scraper is not working. Even when the query URL is identical to a test URL entered in a browser, it returns fx: "Freeones could not find: Anna Bell Peaks - Try a different scraper or try looking manually! "
There must be an issue with the code, but I cannot see what it is.
it's because the site changed some code so the images began with // instead of https://. This conditional if statement fixes it by testing to see if the string starts with // and if so it prepends https: to it.
if first_picture['href']:
if re.match(r'^\/\/', first_picture['href']):
first_picture_link = "https:" + first_picture['href']
else:
first_picture_link = first_picture['href']
print(first_picture_link)
aux.save_actor_profile_image_from_web(first_picture_link, actor_to_search,force)`