Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
F
FranceData
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
1
Issues
1
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Political Memory
FranceData
Commits
ec26c7ed
Commit
ec26c7ed
authored
Jul 13, 2017
by
Okhin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixing some syntax due to py2.7
parent
4d580f75
Pipeline
#1171
passed with stage
in 5 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
francedata/spiders/parl.py
francedata/spiders/parl.py
+1
-1
francedata/spiders/scrutin.py
francedata/spiders/scrutin.py
+2
-2
No files found.
francedata/spiders/parl.py
View file @
ec26c7ed
...
...
@@ -58,7 +58,7 @@ class ParlSpider(CrawlSpider):
for
ad
in
rep
[
'adresses'
]:
adresse
=
ad
[
'adresse'
]
pattern
=
u
r
'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
)
...
...
francedata/spiders/scrutin.py
View file @
ec26c7ed
...
...
@@ -83,10 +83,10 @@ class ScrutinSpider(BaseSpider):
titlediv
=
response
.
xpath
(
'//div[@class="title"]'
)[
0
]
title
=
self
.
get_text
(
titlediv
,
'h1'
)
matches
=
re
.
search
(
u
r
'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
(
u
r
'^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'
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment