YAPO icon indicating copy to clipboard operation
YAPO copied to clipboard

Freeones scraper not working

Open cooperdk opened this issue 6 years ago • 1 comments

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.

cooperdk avatar Jul 22 '18 01:07 cooperdk

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)`

ghost avatar Dec 07 '18 17:12 ghost