From: Aleksander Ɓukasz Date: Mon, 29 Jul 2013 11:09:02 +0000 (+0200) Subject: Fixing flickr parsing X-Git-Url: https://git.mdrn.pl/redakcja.git/commitdiff_plain/c2de733944de9c66c25f61fafa9e295d2c29f32c?ds=sidebyside;hp=--cc Fixing flickr parsing For some images/authors 'photo-name-line-2' is empty. --- c2de733944de9c66c25f61fafa9e295d2c29f32c diff --git a/apps/cover/forms.py b/apps/cover/forms.py index e373a6cb..0173134a 100755 --- a/apps/cover/forms.py +++ b/apps/cover/forms.py @@ -63,7 +63,7 @@ class FlickrForm(forms.Form): except AssertionError: raise forms.ValidationError('Error reading license name.') - m = re.search(r'([^<]*)', html) + m = re.search(r'"ownername":"([^"]*)', html) if m: self.cleaned_data['author'] = "%s@Flickr" % m.group(1) else: