|
|
#1 | |
|
Connoisseur
![]() Posts: 57
Karma: 10
Join Date: Feb 2010
Device: Kindle Paperwhite 1
|
Google Recipe problem
Hi, I've been using a modified version of google reader uber recipe for quite some time.
It was designed to get specifically last 50 starred items from my reader list. Today when I downloaded the recipe, the file appeared to be empty. The file was generated properly, but with no contents, besides this message: Quote:
Code:
import urllib, re, mechanize
from calibre.web.feeds.recipes import BasicNewsRecipe
from calibre import __appname__
class GoogleReader(BasicNewsRecipe):
title = 'Google Starred'
description = 'This recipe downloads feeds you have tagged from your Google Reader account.'
needs_subscription = True
__author__ = 'davec'
base_url = 'http://www.google.com/reader/atom/'
oldest_article = 365
max_articles_per_feed = 50
get_options = '?n=50'
preferred_feeds = ('starred', )
use_embedded_content = True
extra_css = '@font-face {font-family: "serif1";src:url(res:///opt/sony/ebook/FONT/tt0011m_.ttf)} @font-face {font-family: "monospace1";src:url(res:///opt/sony/ebook/FONT/tt0419m_.ttf)} @font-face {font-family: "sans1";src:url(res:///opt/sony/ebook/FONT/tt0003m_.ttf)} body{text-align: left; font-family: "serif1"} .article_date{font-family: "monospace1"}'
def get_browser(self):
br = BasicNewsRecipe.get_browser(self)
if self.username is not None and self.password is not None:
request = urllib.urlencode([('Email', self.username), ('Passwd', self.password),
('service', 'reader'), ('accountType', 'HOSTED_OR_GOOGLE'), ('source', __appname__)])
response = br.open('https://www.google.com/accounts/ClientLogin', request)
auth = re.search('Auth=(\S*)', response.read()).group(1)
print 'Auth is: ', auth
cookies = mechanize.CookieJar()
br = mechanize.build_opener(mechanize.HTTPCookieProcessor(cookies))
br.addheaders = [('Authorization', 'GoogleLogin auth='+auth)]
return br
def get_feeds(self):
feeds = []
soup = self.index_to_soup('http://www.google.com/reader/api/0/tag/list')
for id in soup.findAll(True, attrs={'name':['id']}):
url = id.contents[0]
feed_name = re.search('/([^/]*)$', url).group(1)
if not self.preferred_feeds or feed_name in self.preferred_feeds:
feeds.append((feed_name,
self.base_url + urllib.quote(url.encode('utf-8')) + self.get_options))
return feeds
|
|
|
|
|
|
|
#2 |
|
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,654
Karma: 28549046
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
re-install 0.7.45
|
|
|
|
| Advert | |
|
|
|
|
#3 |
|
Connoisseur
![]() Posts: 57
Karma: 10
Join Date: Feb 2010
Device: Kindle Paperwhite 1
|
just did that. Same error.
|
|
|
|
|
|
#4 |
|
US Navy, Retired
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 9,897
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Kindle PaperWhite SE 11th Gen
|
|
|
|
|
|
|
#5 |
|
Connoisseur
![]() Posts: 57
Karma: 10
Join Date: Feb 2010
Device: Kindle Paperwhite 1
|
ok. that helped. Thanks.
|
|
|
|
| Advert | |
|
|
![]() |
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Google Reader Recipe hack - Download all unread insted of just starred | rollercoaster | Recipes | 82 | 06-17-2011 05:39 PM |
| Google Reader recipe not working :( | techie_007 | Calibre | 1 | 01-26-2010 10:58 PM |
| Tagging and deleting for Google Reader Recipe | jomaweb | Calibre | 14 | 01-26-2010 12:31 PM |
| Recipe Google Reader vs Google Reader Uber | DoctorOhh | Calibre | 0 | 01-26-2010 05:37 AM |
| Google Uber Recipe takes so much time | jomaweb | Calibre | 1 | 01-26-2010 04:21 AM |