Example #1
0
 public static function downloadLogoFromHltv($url)
 {
     $logo_url = Scraper::getLogoUrlFromTeamPage($url);
     $filename = substr($logo_url, strrpos($logo_url, '/') + 1);
     Scraper::grab_image($logo_url, "assets/images/teamlogos/" . $filename);
     return $filename;
 }
Example #2
0
 public static function downloadCSGL_Logos()
 {
     $teams = Team::all();
     foreach ($teams as $team) {
         if ($team->logo == null || $team->logo == "no_logo_new.svg") {
             $team->logo = $team['csgl_name'] . ".jpg";
             Scraper::grab_image(DataLoader::$base_img_url . $team['csgl_name'] . ".jpg", "assets/images/teamlogos/" . $team['csgl_name'] . ".jpg");
             $team->save();
         }
     }
 }