View Single Post
Old 09-29-2010, 04:13 PM   #1
t3d
Enthusiast
t3d began at the beginning.
 
Posts: 38
Karma: 10
Join Date: Nov 2009
Location: Poland
Device: kindle 1st gen, kindle dxg, kindle paperwhite2
how to filter feeds

Hello!

I have some recipes that are almost ready to publish, but there are some articles that won't work on e-readers. I want to filter them out by URL. It should be easy, as their URLs contains some unique strings. Here is my try, that depicts the idea, but doesn't work at all:

Code:
    def get_article_url(self, article): 
        link = article.get('link')
        audio = link.find('audio')
        if not audio:
            return link
I am not familiar with python, so I am not sure if it should have something like "return NULL" when the string is found or not
t3d is offline   Reply With Quote