A feed generator. Currently supports generating RSS feeds from Google, Bing, and Yahoo news.

Overview

RSS Gen: an RSS Generator

Example: Google News

To use this RSS generator to pull information from Google News you would do something like the following:

# Load the Google News parser and RSS feed generator
from feedgen.parsers import GoogleNews

# Parse Google News results
parser = GoogleNews()            # Create the parser object
parser.search_term('cute cats')  # Define  search text
parser.add_site('npr.org')       # Only get results from npr.org
results = parser.parse_html()    # Run the actual query

Once you have the parsed results from the site, you can write out into an RSS-like feed:

from feedgen.writers import RssFeed

# Define the RSS feed
rss_feed = RssFeed(title='My Feed',
                   link='https://www.mysite.com',
                   descrip='NPR news articles that are relevant to cute cats')
# Write the results
rss_feed.write(results, 'npr_cats.xml')

There's also the ability to generate a JSON formatted feed:

from feedgen.writers import JsonFeed

# Define the RSS feed
jsn_feed = JsonFeed(title='My Feed',
                    link='https://www.mysite.com',
                    descrip='NPR news articles that are relevant to cute cats')
# Write the results
jsn_feed.write(results, 'npr_cats.json')

You can also print the results to the screen:

print(results)
Comments
  • Add RSS validation to testing script

    Add RSS validation to testing script

    Short description of the problem/feature request

    Adding RSS validator to the testing script so that the code is also tested.

    Expected behavior

    The code that generates the RSS feed in the testing script should also execute a test of the RSS validator.

    Affected systems (if relevant)

    All systems

    opened by Jvinniec 1
  • Add 'pretty_print' parameter to JsonFeed.write() method

    Add 'pretty_print' parameter to JsonFeed.write() method

    Currently the 'pretty_print' method doesn't actually do anything. This should be updated so that 'pretty_print' actually applies an indentation with new-lines so that the output file is more readable.

    opened by Jvinniec 1
  • Bug/19 fix googlenews

    Bug/19 fix googlenews

    Fixed #19 by adding an additional 'endpoint' variable to the 'Parser' class and setting this to 'search' for both the GoogleNews and YahooNews classes.

    opened by Jvinniec 0
  • GoogleNews class links are bad

    GoogleNews class links are bad

    Google news class has a bug where the generated links in the RSS feed don't appear to work properly.

    There are two problems here:

    1. The results only point back to the top search results (i.e. the links aren't valid)
    2. The search doesn't appear to return relevant results based on the search terms and sites.
    opened by Jvinniec 0
  • Add documentation to each file identifying who wrote it and what it d…

    Add documentation to each file identifying who wrote it and what it d…

    …oes.

    This improves the documentation on each file to include a description up-top of what is in the file and what each of the classes does at a high level.

    opened by Jvinniec 0
  • Add RSS feed validator class

    Add RSS feed validator class

    Feed validator class uses an XML schema file and lxml to validate generated RSS XML files. There is a sample XML schema file contained in feedgen/validators/rss_schema.xml.

    opened by Jvinniec 0
  • Fix site specific search in GoogleNews & BingNews classes

    Fix site specific search in GoogleNews & BingNews classes

    Fixes site specific search in GoogleNews and BingNews.

    The get_params methods for GoogleNews and BingNews were creating variables that included the news sites to search, but this parameter wasn't actually being used. This fixes that issue.

    Resolves #10

    opened by Jvinniec 0
  • Enhancement/7 add helper files

    Enhancement/7 add helper files

    Add documentation files to add helpful information on contributing:

    • LICENSE
    • Contributing.md
    • ChangeLog.md

    These files improve the ability of contributors to understand the repository, how to contribute to it, and how they can incorporate it into their own repositories.

    Resolves #7

    documentation 
    opened by Jvinniec 0
  • Add type hints to function variables

    Add type hints to function variables

    Improve usability of the tool by adding type hints to the function variables. For example, the following function:

    def myfunc(date, text):
       result = f"datetime: {date}\nstring: {text}"
       return result
    

    would be come:

    def myfunc(date : datetime.datetime, text : str) -> str:
       result = f"datetime: {date}\nstring: {text}"
       return result
    

    This allows users the ability to know what type is expected for each variable.

    documentation 
    opened by Jvinniec 0
  • Add news feeds

    Add news feeds

    This pull request adds support for general site parsing and RSS feed generation. The following news sites are added by with direct support:

    • Google News
    • Bing News
    • Yahoo News
    opened by Jvinniec 0
  • Add example feed viewer

    Add example feed viewer

    Add some code that demonstrates how to parse the resulting RSS and JSON feeds. This yields the full end-to-end demonstration of the library's application.

    enhancement 
    opened by Jvinniec 0
Owner
Josh Cardenzana
Former astrophysicist turned data scientist. Also enjoys knitting and random coding on the side.
Josh Cardenzana
This Python3 script will monitor Upwork RSS feed and then email you the results.

Upwork RSS Parser This Python3 script will monitor Upwork RSS feed and then email you the results. Table of Contents General Info Technologies Used Fe

Chris 5 Nov 29, 2021
A ULauncher/Albert extension that supports currency, units and date time conversion, as well as a calculator that supports complex numbers and functions.

Ulauncher/Albert Calculate Anything Ulauncher/Albert Calculate Anything is an extension for Ulauncher and Albert to calculate things like currency, ti

tchar 67 Jan 1, 2023
How to use Microsoft Bing to search for leaks?

Installation In order to install the project, you need install its dependencies: $ pip3 install -r requirements.txt Add your Bing API key to bingKey.t

Ernestas Kardzys 2 Sep 21, 2022
Web service which feeds Navitia with real-time disruptions

Chaos Chaos is the web service which can feed Navitia with real-time disruptions. It can work together with Kirin which can feed Navitia with real-tim

KISIO Digital 7 Jan 7, 2022
The next generation Canto RSS daemon

Canto Daemon This is the RSS backend for Canto clients. Canto-curses is the default client at: http://github.com/themoken/canto-curses Requirements De

Jack Miller 155 Dec 28, 2022
An osu! cheat made in c++ rewritten in python and currently undetected.

megumi-python An osu! cheat made in c++ rewritten in python and currently undetected. Installation Guide Download python 3.9 from https://python.org C

Elaina 2 Nov 18, 2022
New multi tool im making adding features currently

Emera Multi Tool New multi tool im making adding features currently Current List of Planned Features - Linkvertise Bypasser - Discord Auto Bump - Gith

Lamp 3 Dec 3, 2021
This an Anki add on that automatically converts Notion notes into Anki flash cards. Currently in development!

NotionFlash This is an Anki add on in development that will allow automatically convert your Notion study notes into Anki flash cards. The Anki deck c

Neeraj Patel 10 Oct 7, 2022
Get information about what a Python frame is currently doing, particularly the AST node being executed

executing This mini-package lets you get information about what a frame is currently doing, particularly the AST node being executed. Usage Getting th

Alex Hall 211 Jan 1, 2023
Pykeeb - A small Python script that prints out currently connected keyboards

pykeeb ?? ⌨️ A small Python script that detects and prints out currently connect

Jordan Duabe 1 May 8, 2022
Python Service for MISP Feed Management

Python Service for MISP Feed Management This set of scripts is designed to offer better reliability and more control over the fetching of feeds into M

Chris 7 Aug 24, 2022
Automated Content Feed Curator

Gathers posts from content feeds, filters, formats, delivers to you.

Alper S. Soylu 2 Jan 22, 2022
Ahmed Hossam 12 Oct 17, 2022
An esoteric programming language that supports concurrency, regex, and web requests.

The Hofstadter Esoteric Programming Language Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's La

Austin Henley 19 Dec 27, 2022
Zeus is an open source flight intellingence tool which supports more than 13,000+ airlines and 250+ countries.

Zeus Zeus is an open source flight intellingence tool which supports more than 13,000+ airlines and 250+ countries. Any flight worldwide, at your fing

DeVickey 1 Oct 22, 2021
Aero is an open source airplane intelligence tool. Aero supports more than 13,000 airlines and 250 countries. Any flight worldwide at your fingertips.

Aero Aero supports more than 13,000 airlines and 250 countries. Any flight worldwide at your fingertips. Features Main : Flight lookup Aircraft lookup

Vickey 비키 4 Oct 27, 2021
Implements a polyglot REPL which supports multiple languages and shared meta-object protocol scope between REPLs.

MetaCall Polyglot REPL Description This repository implements a Polyglot REPL which shares the state of the meta-object protocol between the REPLs. Us

MetaCall 10 Dec 28, 2022
A minimalist personal blogging system that natively supports Markdown, LaTeX, and code highlighting.

December Welcome to the December blogging system's code repository! Introduction December is a minimalist personal blogging system that natively suppo

TriNitroTofu 10 Dec 5, 2022
A one place destination to check whatever is trending on the top social and news websites at present.

UpTrend A one place destination to check whatever is trending on the top social and news websites at present. Explore the docs » View Demo · Report Bu

Google Developer Student Clubs - JGEC 10 Oct 3, 2021