curtwagner1984 / YAPO

Yapo - Yet Another Porn Organizer
GNU General Public License v3.0
49 stars 10 forks source link

Freeones scraper not working #58

Open cooperdk opened 6 years ago

cooperdk commented 6 years ago

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.

ghost commented 5 years ago

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