From: Radek Czajka Date: Wed, 26 Mar 2014 10:13:37 +0000 (+0100) Subject: Fix Flickr license detection. X-Git-Url: https://git.mdrn.pl/redakcja.git/commitdiff_plain/0f84fb864cfe3f6c642706f40933ede6a74fe0c4?hp=44f4112a8796f5d2c555bed63f34b9ce98e5fe65 Fix Flickr license detection. --- diff --git a/apps/cover/forms.py b/apps/cover/forms.py index f49f4f54..e6ffdff4 100755 --- a/apps/cover/forms.py +++ b/apps/cover/forms.py @@ -80,7 +80,7 @@ class FlickrForm(forms.Form): assert match license_url = match.group(1) self.cleaned_data['license_url'] = license_url - re_license = re.compile(r'http://creativecommons.org/licenses/([^/]*)/([^/]*)/.*') + re_license = re.compile(r'https?://creativecommons.org/licenses/([^/]*)/([^/]*)/.*') m = re_license.match(license_url) assert m self.cleaned_data['license_name'] = 'CC %s %s' % (m.group(1).upper(), m.group(2))