aboutsummaryrefslogtreecommitdiff
path: root/src/web/lib/crawler.py
diff options
context:
space:
mode:
authorFrançois Schmidts <francois.schmidts@gmail.com>2015-09-11 18:28:12 +0200
committerFrançois Schmidts <francois.schmidts@gmail.com>2016-01-26 23:46:30 +0100
commit462f6d3b21558ed0a283c24e0e0332eac6ccbbb3 (patch)
tree451c583b5f47bbf6e38743881c66f2f27371bd82 /src/web/lib/crawler.py
parentmoving the root of source code from / to /src/ (diff)
downloadnewspipe-462f6d3b21558ed0a283c24e0e0332eac6ccbbb3.tar.gz
newspipe-462f6d3b21558ed0a283c24e0e0332eac6ccbbb3.tar.bz2
newspipe-462f6d3b21558ed0a283c24e0e0332eac6ccbbb3.zip
base modification in model for category support
Diffstat (limited to 'src/web/lib/crawler.py')
-rw-r--r--src/web/lib/crawler.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/web/lib/crawler.py b/src/web/lib/crawler.py
index 7343ea4d..f480fe96 100644
--- a/src/web/lib/crawler.py
+++ b/src/web/lib/crawler.py
@@ -18,7 +18,6 @@ import json
import logging
import feedparser
from datetime import datetime, timedelta
-from functools import wraps
from time import strftime, gmtime
from concurrent.futures import ThreadPoolExecutor
from requests_futures.sessions import FuturesSession
@@ -132,7 +131,7 @@ class PyAggUpdater(AbstractCrawler):
{key: "%s -> %s" % (up_feed[key], self.feed.get(key))
for key in up_feed if up_feed[key] != self.feed.get(key)})
- future = self.query_pyagg('put', 'feed/%d' % self.feed['id'], up_feed)
+ self.query_pyagg('put', 'feed/%d' % self.feed['id'], up_feed)
class FeedCrawler(AbstractCrawler):
@@ -144,8 +143,8 @@ class FeedCrawler(AbstractCrawler):
def clean_feed(self):
"""Will reset the errors counters on a feed that have known errors"""
if self.feed.get('error_count') or self.feed.get('last_error'):
- future = self.query_pyagg('put', 'feed/%d' % self.feed['id'],
- {'error_count': 0, 'last_error': ''})
+ self.query_pyagg('put', 'feed/%d' % self.feed['id'],
+ {'error_count': 0, 'last_error': ''})
def callback(self, response):
"""will fetch the feed and interprete results (304, etag) or will
bgstack15