Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
WikiEducator
oerupartners
Commits
545480f5
Commit
545480f5
authored
Mar 24, 2018
by
Jim Tittsler
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Strip whitspace from printname as well.
parent
ff78af89
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
oerupartners.py
oerupartners.py
+2
-2
No files found.
oerupartners.py
View file @
545480f5
...
...
@@ -106,8 +106,8 @@ def make_partner_pages(we, partners):
partner_page
=
requests
.
get
(
partner
[
'url'
])
tree
=
html
.
fromstring
(
partner_page
.
text
)
printname
=
tree
.
xpath
(
'//h3/text()'
)
printname
=
printname
[
0
]
if
len
(
printname
)
>
0
else
''
printname
=
tree
.
xpath
(
'//h3/text()'
)
.
strip
()
printname
=
printname
[
0
]
.
strip
if
len
(
printname
)
>
0
else
''
tagline
=
tree
.
xpath
(
'//h5/text()'
)
tagline
=
tagline
[
0
]
if
len
(
tagline
)
>
0
else
''
body
=
tree
.
xpath
(
'//*[@id="main"]/div/div[2]/div'
)
...
...
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