1
0
Fork 0

Remove unnecessary comments and blank lines.

This commit is contained in:
Jack Hadrill 2020-01-18 23:48:23 +00:00
parent 47c66592d9
commit 04a6707157
3 changed files with 0 additions and 4 deletions

View File

@ -63,7 +63,6 @@ class Grabber(ABC):
articles = [] articles = []
for article in feed.iter("item"): for article in feed.iter("item"):
try: try:
# Sat, 18 Jan 2020 14:21:49 -0500
timestamp = int(datetime.strptime(article.find("pubDate").text, self.date_format).timestamp()) timestamp = int(datetime.strptime(article.find("pubDate").text, self.date_format).timestamp())
title = article.find("title").text title = article.find("title").text
description = article.find("description").text description = article.find("description").text
@ -89,4 +88,3 @@ class Grabber(ABC):
logging.error(f"Unable to download updated news articles from {self.name}.") logging.error(f"Unable to download updated news articles from {self.name}.")
except (et.ParseError, ValueError): except (et.ParseError, ValueError):
logging.error(f"Unable to parse updated news articles from {self.name}.") logging.error(f"Unable to parse updated news articles from {self.name}.")

View File

@ -3,5 +3,4 @@ from grabber import Grabber
class IBTimesCompanies(Grabber): class IBTimesCompanies(Grabber):
feed_url = "http://www.ibtimes.co.uk/rss/companies" feed_url = "http://www.ibtimes.co.uk/rss/companies"
# 2020-01-17T09:50:28+00:00
date_format = "%Y-%m-%dT%H:%M:%S%z" date_format = "%Y-%m-%dT%H:%M:%S%z"

View File

@ -3,5 +3,4 @@ from grabber import Grabber
class IBTimesTechnology(Grabber): class IBTimesTechnology(Grabber):
feed_url = "http://www.ibtimes.co.uk/rss/technology" feed_url = "http://www.ibtimes.co.uk/rss/technology"
# 2020-01-17T09:50:28+00:00
date_format = "%Y-%m-%dT%H:%M:%S%z" date_format = "%Y-%m-%dT%H:%M:%S%z"