Code Monkey home page Code Monkey logo

Comments (6)

RebelCodeBase avatar RebelCodeBase commented on August 11, 2024

There are two issues here:
(1) An error like this should be handled gracefully and a meaningful error message should be generated. I will fix this.
(2) The feed has no entries. See this ipython3 session:

In [1]: import feedparser

In [2]: feedparser.parse('https://feeds.feedburner.com/DiscoveryNews-Top-Stories')
Out[2]:
{'bozo': 1,
'bozo_exception': xml.sax._exceptions.SAXParseException('not well-formed (invalid token)'),
'encoding': 'UTF-8',
'entries': [],
(...)

from sopel-rss.

RebelCodeBase avatar RebelCodeBase commented on August 11, 2024

Version 0.2.0 is out. It would be nice if you could install it. Please not: the format of "feeds" in the config file changed. You need to replace the spaces between channel, feed, url and format by pipes ("|").

from sopel-rss.

rinzes avatar rinzes commented on August 11, 2024

I used the DEFAULT format in the rss.py. Do I need to add the format in the cfg file

from sopel-rss.

RebelCodeBase avatar RebelCodeBase commented on August 11, 2024

Now, you can (and should) leave FORMAT_DEFAULT alone and use "formats" instead where you can define one or more custom default formats. For example, you can specify one format that you'd like to use but not all of you feeds have the necessary fields. Then a second best for those. At last, the global FORMAT_DEFAULT or a minimal default format will be used. Of course, you can override the format for each feed.

You can now also use "templates" to define you own custom templates (for example colors or braces or fancy unicode characters). You need not override all format strings only those that you'd like to change.

I've also implemented an online help, for example: .rss custom define formats

I've written over 100 py.tests but of course, there might be bugs left. I'd be happy to fix them if you report the issues.

from sopel-rss.

rinzes avatar rinzes commented on August 11, 2024

thanks for all your hard work

from sopel-rss.

RebelCodeBase avatar RebelCodeBase commented on August 11, 2024

you are welcome. it's good to see that the module is used.

from sopel-rss.

Related Issues (20)

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.