script: Wikipedia API's python wrapper does not return garbage text anymore.

I can't see new commits since 2014. So I am assuming the issue was on
Wikipedia side and that it has been fixed.
This commit is contained in:
Jehan 2016-02-21 16:07:10 +01:00
parent 37024460fe
commit d24bd7d578
3 changed files with 3 additions and 3 deletions

View File

@ -57,7 +57,7 @@ case_mapping = True
# A function to clean content returned by the `wikipedia` python lib,
# in case some unwanted data has been overlooked.
def clean_wikipedia_content(content):
cleaned = re.sub(r'(=+) *([^=]+) *Επεξεργασία \1',
cleaned = re.sub(r'(=+) *([^=]+) *\1',
r'\2',
content)
return cleaned

View File

@ -71,7 +71,7 @@ case_mapping = True
# A function to clean content returned by the `wikipedia` python lib,
# in case some unwanted data has been overlooked.
def clean_wikipedia_content(content):
cleaned = re.sub(r'(=+) *([^=]+) *Editar \1',
cleaned = re.sub(r'(=+) *([^=]+) *\1',
r'\2',
content)
return cleaned

View File

@ -72,7 +72,7 @@ case_mapping = True
# in case some unwanted data has been overlooked.
def clean_wikipedia_content(content):
# We get modify link in the text: "=== Articles connexesModifier ==="
cleaned = re.sub(r'(=+) *([^=]+) *Modifier \1',
cleaned = re.sub(r'(=+) *([^=]+) *\1',
r'\2',
content)
return cleaned