Start Quickly

Alright, let’s get you going. I’m assuming that your operating system is a debian linux distribution like Ubuntu, that you’re using Python version 2.7, and that you are able to access your terminal. We are going to load a sqlite3 database with news articles from several RSS feeds.


If you haven’t already, you can install GatherNews via pip:

$ pip install gathernews

Load a SQLite3 database

Now, we’re ready to load the SQLite3 database with articles from the RSS feeds we’ve previously specified.

$ # First, let's get our project path and make note of it.
$ pwd
$ # Now we're ready to start up Python
$ python
>>> from gathernews.gRSS import CaptureFeeds
>>> capture_feeds = CaptureFeeds("/home/tyler/my_project/")
>>> capture_feeds.load_db()

We’ve now created a new table for each one of the RSS feeds you previously specified, populated each table, and removed any duplicate entries in those tables.

Anytime you want to load the database with new articles from your RSS feeds, we can just use the same method. Let’s say you add additional tables to your “feeds_list.txt”, just use the same method; load_db().

Table Of Contents

Related Topics

This Page

Fork me on GitHub