aboutsummaryrefslogtreecommitdiff
path: root/pyaggr3g470r/views.py
diff options
context:
space:
mode:
authorCédric Bonhomme <cedric@cedricbonhomme.org>2014-04-13 12:34:57 +0200
committerCédric Bonhomme <cedric@cedricbonhomme.org>2014-04-13 12:34:57 +0200
commit7de9e5d981a855eeb2a90882d380b5a096553261 (patch)
tree0bdbd6a0c0b971917e6d7b8f65867ee5b2b75bfb /pyaggr3g470r/views.py
parentFixed history view. (diff)
downloadnewspipe-7de9e5d981a855eeb2a90882d380b5a096553261.tar.gz
newspipe-7de9e5d981a855eeb2a90882d380b5a096553261.tar.bz2
newspipe-7de9e5d981a855eeb2a90882d380b5a096553261.zip
Test of the new crawler with gevent.
Diffstat (limited to 'pyaggr3g470r/views.py')
-rw-r--r--pyaggr3g470r/views.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/pyaggr3g470r/views.py b/pyaggr3g470r/views.py
index a8d7e19c..ddc0ddf0 100644
--- a/pyaggr3g470r/views.py
+++ b/pyaggr3g470r/views.py
@@ -37,7 +37,7 @@ from werkzeug import generate_password_hash
import conf
import utils
import export
-import feedgetter
+import feedgetter, crawler
import models
if not conf.ON_HEROKU:
import search as fastsearch
@@ -181,13 +181,14 @@ def home():
return render_template('home.html', result=result, head_title=unread_articles)
@app.route('/fetch/', methods=['GET'])
-@app.route('/fetch/<feed_id>', methods=['GET'])
+@app.route('/fetch/<int:feed_id>', methods=['GET'])
@login_required
def fetch(feed_id=None):
"""
Triggers the download of news.
"""
- feed_getter = feedgetter.FeedGetter(g.user.email)
+ #feed_getter = feedgetter.FeedGetter(g.user.email)
+ feed_getter = crawler.FeedGetter(g.user.email)
feed_getter.retrieve_feed(feed_id)
flash("New articles retrieved.", 'success')
return redirect(redirect_url())
bgstack15