View Single Post
Old 05-25-2011, 12:31 PM   #76
jens32
Junior Member
jens32 began at the beginning.
 
Posts: 5
Karma: 10
Join Date: May 2011
Device: Kindle 3
Question mark items read

Quote:
Originally Posted by der_joh View Post
I found this in the bugtracking System, does the recipe work currently?
http://oldbugs.calibre-ebook.com/ticket/7581

Marking downloaded Feeds as read would be more than nice ;-)
I have taken the script and played with it for quiet some time now. I couldn't figure out how to get it working.

I get a 401 error for the second last line. The article.id doesn't seem to fit and I couldn't figure out how to get the right id of the articles. article.id is in the form of {'original-id': u'http://www.blogurl.com/?p=38615', 'gr:original-id': u'http://www.blogurl.com/?p=38615'}. Does this work or is the problem somewhere else?

PHP Code:
    def build_request(selfurl):
        
req mechanize.Request(url)
        
req.add_header('Authorization''GoogleLogin auth=%s' self.auth)
        return 
req

    def article_downloaded
(selfrequestresult):
        
br self.browser
        req 
self.build_request(self.mark_as_read_url)
        if 
not result[2]:
            
# Mark article as downloaded.
            
article request.article
            fields 
urllib.urlencode([("i"article.id), ("a""user/-/state/com.google/read"),
                (
"ac""edit-tags"), ("T"self.token)])
            
br.open(self.mark_as_read_urlfields)
        return 
BasicNewsRecipe.article_downloaded(selfrequestresult
jens32 is offline   Reply With Quote