Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Kiste
ftfdscrpr
Commits
3fc391e0
Commit
3fc391e0
authored
Feb 23, 2018
by
Kiste
Browse files
Fix broken articles
parent
78bdb937
Changes
1
Hide whitespace changes
Inline
Side-by-side
ftfdscrpr/ftfdscrpr.py
View file @
3fc391e0
...
...
@@ -100,6 +100,9 @@ def do_feed(url, rules_path, verbose):
if
'comments'
in
url_rules
:
comments
=
soup
.
select
(
url_rules
[
'comments'
])
soup
=
do_soup
(
soup
,
url_rules
,
url
,
verbose
)
if
not
soup
:
fe
.
content
(
'Error doing the soup!'
)
continue
if
comments
:
for
e
in
comments
:
soup
.
append
(
e
)
...
...
@@ -118,7 +121,10 @@ def do_feed(url, rules_path, verbose):
def
do_soup
(
soup
,
rules
,
url
,
verbose
):
new_soup
=
soup
.
select
(
rules
[
'article'
])
new_soup
=
new_soup
[
0
]
try
:
new_soup
=
new_soup
[
0
]
except
IndexError
:
return
None
if
'next'
in
rules
:
for
page
in
new_soup
.
select
(
rules
[
'next'
]):
if
verbose
:
...
...
Write
Preview
Supports
Markdown
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