Skip to content

Commit

Permalink
Merge pull request #127 from Lukas0907/vice
Browse files Browse the repository at this point in the history
vice.com: Improve cleanup.
  • Loading branch information
Lukas0907 committed Jul 9, 2018
2 parents cd7d6f7 + f0d4676 commit 0fe0fc5
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion feeds/spiders/vice_com.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,12 @@ def start_requests(self):

def parse(self, response):
articles = json.loads(response.text)
remove_elems = ["hr + p:contains('Auch bei Vice')", "hr", "iframe"]
remove_elems = [
"hr + p",
"hr",
"iframe",
"p i:last-of-type:contains('Facebook'):contains('Twitter')",
]
for article in articles:
il = FeedEntryItemLoader(timezone=self._timezone, remove_elems=remove_elems)
il.add_value("title", article["title"])
Expand Down

0 comments on commit 0fe0fc5

Please sign in to comment.