google-play-scraper icon indicating copy to clipboard operation
google-play-scraper copied to clipboard

Screnshots are blank images encoded to base64

Open Nolesh opened this issue 6 years ago • 1 comments

Hi, I tried this scraper and noticed that only 2 first screenshots are valid. The rest ones are blank images encoded to base64 (data:image/gif;base64,R0lGODlhAQABAIAAAP///////yH5BAEKAAEALAAAAAABAAEAAAICTAEAOw). How to solve this issue? Thank you.

Nolesh avatar Feb 18 '19 15:02 Nolesh

Hi, I tried this scraper and noticed that only 2 first screenshots are valid. The rest ones are blank images encoded to base64 (data:image/gif;base64,R0lGODlhAQABAIAAAP///////yH5BAEKAAEALAAAAAABAAEAAAICTAEAOw). How to solve this issue? Thank you.

edit vendor ->raul -> Scapper.php and replace the $info['screenshots'] with the below code :

$info['screenshots'] = $crawler->filter('[jscontroller="jt8Aqb"]')->each(function ($node) { 
            if(strlen($node->filter('img')->attr('data-src')) == 0){
                return substr($node->filter('img')->attr('src'), 0, strpos($node->filter('img')->attr('src'), "="));
            }else{
                return $node->filter('img')->attr('data-src');
            }
});

droidmanspace avatar Mar 18 '19 08:03 droidmanspace