summaryrefslogtreecommitdiff
path: root/watchnews/fetch.py
diff options
context:
space:
mode:
authorYves Fischer <yvesf-git@xapek.org>2015-11-23 23:14:17 +0100
committerYves Fischer <yvesf-git@xapek.org>2015-11-23 23:14:17 +0100
commit4c2a9d256623360b34a37dbde19531919af41c21 (patch)
treefa8f87435d8108d071963283aea0b6bb0f0da62a /watchnews/fetch.py
parent6b37966de51c01e6a55dd0188d9d2ac953559c14 (diff)
downloadwatchnews-4c2a9d256623360b34a37dbde19531919af41c21.tar.gz
watchnews-4c2a9d256623360b34a37dbde19531919af41c21.zip
replace all " with '
Diffstat (limited to 'watchnews/fetch.py')
-rwxr-xr-xwatchnews/fetch.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/watchnews/fetch.py b/watchnews/fetch.py
index 5201c1e..e6c5c39 100755
--- a/watchnews/fetch.py
+++ b/watchnews/fetch.py
@@ -9,7 +9,7 @@ from newspaper.cleaners import DocumentCleaner
import logging
def update(feed):
- logging.info("Update %s", feed.url)
+ logging.info('Update %s', feed.url)
result = feedparser.parse(feed.url)
if result['feed']['title'] != feed.title:
feed.title = result['feed']['title']
@@ -44,7 +44,7 @@ def update(feed):
version.url = entry['link']
authors = paper.authors
authors.sort()
- version.authors = ", ".join(authors)
+ version.authors = ', '.join(authors)
version.title = paper.title
version.text = paper.text
@@ -64,7 +64,7 @@ def update(feed):
version.text = text
if len(version.text) < 2: # less than 2 chars is likely failure
- raise Exception("failed to parse {}\n{}".format(entry,version))
+ raise Exception('failed to parse {}\n{}'.format(entry,version))
# search if the previous version was the same
ident_version = data.Version.select().where(
@@ -74,10 +74,10 @@ def update(feed):
(data.Version.text == version.text)).first()
if ident_version:
- logging.info("No change, skip %s", item.uid)
+ logging.info('No change, skip %s', item.uid)
else:
version.save()
- logging.info("Saved new version of %s: %s", item.uid, version.id)
+ logging.info('Saved new version of %s: %s', item.uid, version.id)
except Exception as e:
- logging.exception("Failed to process %s", entry['link'])
+ logging.exception('Failed to process %s', entry['link'])