def handle(self, *args, **options):
from_id = options.get('from_id', 1)
for image in Image.objects.filter(id__gte=from_id).exclude(book=None).order_by('id'):
- print image.id
- if image.source_url and 'flickr.com' in image.source_url:
+ if image.source_url and 'flickr.com' in image.source_url and not image.download_url.endswith('_o.jpg'):
+ print image.id
try:
flickr_data = get_flickr_data(image.source_url)
print flickr_data