diff options
author | Cédric Bonhomme <cedric@cedricbonhomme.org> | 2015-03-04 22:42:03 +0100 |
---|---|---|
committer | Cédric Bonhomme <cedric@cedricbonhomme.org> | 2015-03-04 22:42:03 +0100 |
commit | 1ab7e67cb2ced95934f9a0c91d1d2f3394af85c1 (patch) | |
tree | 1851ea79922e249e329479b61f411bf3cbb2a7f8 | |
parent | Typo. (diff) | |
download | newspipe-1ab7e67cb2ced95934f9a0c91d1d2f3394af85c1.tar.gz newspipe-1ab7e67cb2ced95934f9a0c91d1d2f3394af85c1.tar.bz2 newspipe-1ab7e67cb2ced95934f9a0c91d1d2f3394af85c1.zip |
Removed fetch.py since the crawler is now launched by the manager.
-rwxr-xr-x | fetch.py | 33 |
1 files changed, 0 insertions, 33 deletions
diff --git a/fetch.py b/fetch.py deleted file mode 100755 index db950aa0..00000000 --- a/fetch.py +++ /dev/null @@ -1,33 +0,0 @@ -#! /usr/bin/env python -# -*- coding: utf-8 -*- - -# fetch.py -# -# You can use this script with cron, for example: -# */30 * * * * cd ~/.pyaggr3g470r/ ; python fetch.py -# to fetch articles every 30 minutes. -import sys -import bootstrap -from pyaggr3g470r import crawler -from pyaggr3g470r.models import User - -if __name__ == "__main__": - # Point of entry in execution mode - users, feed_id = [], None - try: - users = User.query.filter(User.id == int(sys.argv[1])).all() - except: - users = User.query.all() - finally: - if users == []: - users = User.query.all() - - try: - feed_id = int(sys.argv[2]) - except: - feed_id = None - - for user in users: - if user.activation_key == "": - print("Fetching articles for " + user.nickname) - feed_getter = crawler.retrieve_feed(user, feed_id) |