jenkins-bot has submitted this change and it was merged.

Change subject: Further fixes to GetList regex
......................................................................


Further fixes to GetList regex

Change-Id: I0f4a31dc63fe5ac8de64a0198148ae8dcbc24ecd
---
M erfgoedbot/categorize_images.py
1 file changed, 2 insertions(+), 2 deletions(-)

Approvals:
  Jean-Frédéric: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/erfgoedbot/categorize_images.py b/erfgoedbot/categorize_images.py
index 4007514..6fd6d47 100644
--- a/erfgoedbot/categorize_images.py
+++ b/erfgoedbot/categorize_images.py
@@ -373,12 +373,12 @@
     Get listpage
     '''
     if monumentSource:
-        regex = 
u'^(https:)?//%s.wikipedia.org/w/index.php\?title=(.+)(&redirect=)?' % (
+        regex = u'^(https:)?//%s.wikipedia.org/w/index.php\?title=(.+?)&' % (
             lang,)
         match = re.search(regex, monumentSource)
         if not match:
             return False
-        page_title = match.group(1)
+        page_title = match.group(2)
         site = pywikibot.Site(lang, u'wikipedia')
         return pywikibot.Page(site, page_title)
     else:

-- 
To view, visit https://gerrit.wikimedia.org/r/236397
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I0f4a31dc63fe5ac8de64a0198148ae8dcbc24ecd
Gerrit-PatchSet: 1
Gerrit-Project: labs/tools/heritage
Gerrit-Branch: master
Gerrit-Owner: Jean-Frédéric <jeanfrederic.w...@gmail.com>
Gerrit-Reviewer: Jean-Frédéric <jeanfrederic.w...@gmail.com>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to