def get_next(self): imgur_str = n_to_imgur(self.count) url = 'http://i.imgur.com/%s.png' % imgur_str resp = requests.head(url) self.results[self.count] = resp.headers self.count += 1
def get_imgur(self,num): imgur_str = n_to_imgur(num) url = 'http://i.imgur.com/%s.png' % imgur_str resp = requests.head(url) if self.verbose: print '%s\t%d\t%d\t%s\t%s' % (self.name, len(self.results), self.count, resp.url, resp.status_code) self.count += 1 self.results[imgur_str] = resp.headers
def _get_imgur_str(self): return n_to_imgur(num)