Skip to main content

Decorator-based RSS Feed Fetcher for Python3

Usage

from feedy import Feedy
from bs4 import BeautifulSoup

feedy = Feedy(max_entries=5)

@feedy.add('http://nwpct1.hatenablog.com/rss')
def c_bata_web(feed_info, entry_info, body):
    """Get image urls in my blog's article"""
    soup = BeautifulSoup(body, "html.parser")
    for x in soup.find_all('img', {'class': 'hatena-fotolife'}):
        print(x['src'])

@feedy.add('https://www.djangopackages.com/feeds/packages/latest/rss/')
def djangopackages(feed_info, entry_info, body):
    """Get the latest django library information."""
    print("- [{pkgname}]({link})".format(pkgname=entry_info['title'], link=entry_info['link']))

if __name__ == '__main__':
    feedy.run('all')

After that, please execute a following command:

$ feedy example:feedy -t djangopackages
- [django-simple-address](http://www.djangopackages.com/packages/p/django-simple-address/)
- [django-db-sanitizer](http://www.djangopackages.com/packages/p/django-db-sanitizer/)
- [fluentcms-jumbotron](http://www.djangopackages.com/packages/p/fluentcms-jumbotron/)
- [fluentcms-contactform](http://www.djangopackages.com/packages/p/fluentcms-contactform/)
- [fluentcms-pager](http://www.djangopackages.com/packages/p/fluentcms-pager/)

$ feedy example:feedy  # Run all when given no target arguments.
- [django-simple-address](http://www.djangopackages.com/packages/p/django-simple-address/)
- [django-db-sanitizer](http://www.djangopackages.com/packages/p/django-db-sanitizer/)
- [fluentcms-jumbotron](http://www.djangopackages.com/packages/p/fluentcms-jumbotron/)
- [fluentcms-contactform](http://www.djangopackages.com/packages/p/fluentcms-contactform/)
- [fluentcms-pager](http://www.djangopackages.com/packages/p/fluentcms-pager/)
- http://cdn-ak.f.st-hatena.com/images/fotolife/n/nwpct1/20160409/20160409180830.png
- http://cdn-ak.f.st-hatena.com/images/fotolife/n/nwpct1/20160107/20160107173222.png
- http://cdn-ak.f.st-hatena.com/images/fotolife/n/nwpct1/20160107/20160107173406.jpg

If you want to fetch the updated entries, please specified file_path parameter like feedy = Feedy('./feedy.dat').

Command Line Interface

$ feedy -h
usage: Run your feedy's project flexibly. [-h] [-t TARGET [TARGET ...]] obj

positional arguments:
  obj                   Specify feedy object (style. <filename:obj>)

optional arguments:
  -h, --help            show this help message and exit
  -t TARGET [TARGET ...], --target TARGET [TARGET ...]
                        The target function names

Requirements

  • feedparser

Resources

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

feedy-0.0.1.tar.gz (4.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

feedy-0.0.1-py3-none-any.whl (6.2 kB view details)

Uploaded Python 3

File details

Details for the file feedy-0.0.1.tar.gz.

File metadata

  • Download URL: feedy-0.0.1.tar.gz
  • Upload date:
  • Size: 4.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for feedy-0.0.1.tar.gz
Algorithm Hash digest
SHA256 d39a9070992657bc6b6ffaef51b165473eb5ef26ec412b1e00caa9a204f6a2b2
MD5 0d64974bd0c8c7891e9241328f04b0fc
BLAKE2b-256 ce03fa9c91eb59d97a9bb8ec5f601131683672089527326ba1617fcd6c3020ec

See more details on using hashes here.

File details

Details for the file feedy-0.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for feedy-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 dda67f5322a175b554e852b45ee4f6410502c11c9954594b2cdec1bf38935d64
MD5 57155a061331b4d7a09a80e565848c5c
BLAKE2b-256 14868101534fdab4a14be14ded5cbbbe3cbdd85b179da5fe1db2b3628e640148

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page