Giter Club home page Giter Club logo

feedfinder2's Introduction

Feedfinder2

This is a Python library for finding links feeds on a website. It is based on feedfinder - originally written by Mark Pilgrim and subsequently maintained by Aaron Swartz until his untimely death.

Usage

Feedfinder2 offers a single public function: find_feeds. You would use it as follows:

from feedfinder2 import find_feeds
feeds = find_feeds("xkcd.com")

Now, feeds is the list: ['http://xkcd.com/atom.xml', 'http://xkcd.com/rss.xml']. There is some attempt made to rank feeds from best candidate to worst but... well... you never know.

License

Feedfinder2 is licensed under the MIT license (see LICENSE).

feedfinder2's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

feedfinder2's Issues

long_description=open("README.rst").read() cause UnicodeDecodeError

In python 3 win7 x64 chinese,
detail

> pip install feedfinder2
Collecting feedfinder2
  Downloading http://mirrors.aliyun.com/pypi/packages/source/f/feedfinder2/feedfinder2-0.0.1.tar.gz
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 20, in <module>
      File "c:\users\kasim\appdata\local\temp\pip-build-sapqnv\feedfinder2\setup.py", line 21, in <module>
        long_description=open("README.rst").read(),
    UnicodeDecodeError: 'gbk' codec can't decode bytes in position 161-162: illegal multibyte sequence

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in c:\users\kasim\appdata\local\temp\pip-build-sapqnv\feedfi
nder2

Installation is broken in 0.0.2

$ mktmpenv 
New python executable in tmp-ec9bbfb1a8576f4/bin/python
Installing setuptools, pip, wheel...done.
This is a temporary environment. It will be deleted when you run 'deactivate'.

$ pip install feedfinder2
Collecting feedfinder2
  Downloading feedfinder2-0.0.2.tar.gz
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 20, in <module>
      File "/tmp/pip-build-iZmsj6/feedfinder2/setup.py", line 8, in <module>
        import feedfinder2
      File "feedfinder2.py", line 9, in <module>
        import requests
    ImportError: No module named requests

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-iZmsj6/feedfinder2

The requirements are imported before setup.py processes the install_requires section, because of the import feedfinder2 line in setup.py.

The breaking change is: bf354c1#diff-2eeaed663bd0d25b7e608891384b7298R8

Allow find_feeds() to take an allow_redirects argument to pass to requests

Currently, there is no way to handle redirects explicitly. I ran into some issues with this when iterating over a large number of URLs with widely varying formats. If my script hit a URL with too many redirects, requests would fail but without raising an explicit error, hanging the entire script.

UserWarning: No parser was explicitly specified for BeautifulSoup usage

I'm seeing this error:

UserWarning: No parser was explicitly specified, so I'm using the best available HTML parser for this system ("html.parser"). This usually isn't a problem, but if you run this code on another system, or in a different virtual environment, it may use a different parser and behave differently.

To get rid of this warning, change this:

 BeautifulSoup([your markup])

to this:

 BeautifulSoup([your markup], "html.parser")

  markup_type=markup_type))

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.