Commit ec26c7ed authored by Okhin's avatar Okhin

Fixing some syntax due to py2.7

parent 4d580f75
Pipeline #1171 passed with stage
in 5 seconds
......@@ -58,7 +58,7 @@ class ParlSpider(CrawlSpider):
for ad in rep['adresses']:
adresse = ad['adresse']
pattern = ur'Télé(phone|copie)\s*:\s*(\d[0-9 ]+\d)'
pattern = r'Télé(phone|copie)\s*:\s*(\d[0-9 ]+\d)'
for telm in re.finditer(pattern, adresse):
if telm.group(1) == 'phone':
ad['tel'] = telm.group(2)
......
......@@ -83,10 +83,10 @@ class ScrutinSpider(BaseSpider):
titlediv = response.xpath('//div[@class="title"]')[0]
title = self.get_text(titlediv, 'h1')
matches = re.search(ur'scrutin-public/(\d+)/scr.*\.html', response.url)
matches = re.search(r'scrutin-public/(\d+)/scr.*\.html', response.url)
session = matches.group(1)
matches = re.search(ur'^Scrutin n° (\d+) - séance du (.*)$', title)
matches = re.search(r'^Scrutin n° (\d+) - séance du (.*)$', title)
item['numero'] = '%s-%s' % (session, matches.group(1))
objet = self.get_text(response, '//div[@id="wysiwyg"]/p/i')
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment