scrapper.py
def download_images(self, image_src_list):
        """
        ============================================
        get a list of images and use urlretrieve to
        try download every image in hte list
        ============================================
        """
        
        repo_name = self.class_name
        try:
            os.mkdir(repo_name)
        except:
            repo_name = self.class_name+'-'+str(time.time())
            os.mkdir(repo_name)
        
        images_downloaded = 0
        for index, image_src in enumerate(image_src_list):
            try:
                urlretrieve(image_src, repo_name+"/"+self.class_name+str(index)+'.jpg')
                # print('download [OK]: %s...' % image_src[:self.max_string_size])
                images_downloaded += 1
            except:
                print('download [FAILED]: %s...' % image_src[:self.max_string_size])    
            if index == self.quant_images - 1 or index == self.max_images - 1: break
            
        print('%s images downloaded from the class %s check your class folder.' % (str(images_downloaded), self.class_name))

        ============================================
        get a list of images and use urlretrieve to
        try download every image in hte list
        ============================================
        
get a list of images and use urlretrieve to
try download every image in hte list
get a list of images and use urlretrieve to try download every image in hte list
def download_images(self, image_src_list):
        repo_name = self.class_name
        try:
            os.mkdir(repo_name)
        except:
            repo_name = self.class_name+'-'+str(time.time())
            os.mkdir(repo_name)
        images_downloaded = 0
        for index, image_src in enumerate(image_src_list):
            try:
                urlretrieve(image_src, repo_name+"/"+self.class_name+str(index)+'.jpg')
                images_downloaded += 1
            except:
                print('download [FAILED]: %s...' % image_src[:self.max_string_size])    
            if index == self.quant_images - 1 or index == self.max_images - 1: break
        print('%s images downloaded from the class %s check your class folder.' % (str(images_downloaded), self.class_name))
def download_images ( self , image_src_list ) : repo_name = self . class_name try : os . mkdir ( repo_name ) except : repo_name = self . class_name + '-' + str ( time . time ( ) ) os . mkdir ( repo_name ) images_downloaded = 0 for index , image_src in enumerate ( image_src_list ) : try : urlretrieve ( image_src , repo_name + "/" + self . class_name + str ( index ) + '.jpg' ) images_downloaded += 1 except : print ( 'download [FAILED]: %s...' % image_src [ : self . max_string_size ] ) if index == self . quant_images - 1 or index == self . max_images - 1 : break print ( '%s images downloaded from the class %s check your class folder.' % ( str ( images_downloaded ) , self . class_name ) )
get a list of images and use urlretrieve to
try download every image in hte list
get a list of images and use urlretrieve to try download every image in hte list
"""
        ============================================
        get a list of images and use urlretrieve to
        try download every image in hte list
        ============================================
        """ # print('download [OK]: %s...' % image_src[:self.max_string_size])
self
image_src_list