09-10-2011, 10:10 AM | #1 |
Zealot
Posts: 143
Karma: 387
Join Date: Sep 2010
Device: Kindle 3
|
Recipes need update
Hi,
I trying out a number of recipes and wonder if we should have a sticky to identify those recipes that do not work properly anymore and need an update. I'd like to add Code:
Business Week CIO (CIO Magazin) Inquirer.net (The Inquirer) We could even have a voting list to see which are (or rather would be) the most popular ones. Regards, Mixx |
09-11-2011, 04:11 AM | #2 | |
Member
Posts: 23
Karma: 12
Join Date: Jul 2011
Device: Cool-er
|
Quote:
One of them over-cuts articles... wiith this I mean that some articles do "show" and they show "perfect"... while others simply are missing (the article, not the item list on the menu). In fact, the recipe generates a blank page for those articles, with an hyperlink to the missing page, and the hyperlink is correct. The other one (the second recipe for business week) shows all the articles, but all of them with lots of extra information (webpage navigation menus, and so on). With respect to CIO. I use the provided recipe, and it works PERFECT. The only "but" I can add is that it is not a recipe for the CIO magazine, but for the RSS feed that the site provides with daily news. I don't use the Inquirer. Best regards. |
|
Advert | |
|
09-11-2011, 05:04 AM | #3 |
Member
Posts: 23
Karma: 12
Join Date: Jul 2011
Device: Cool-er
|
I have a recipe for CIO Magazine. (please find it enclosed, and use it or not at your own risk)
My knowledge about Python, Beautiful soup, Mechanize or CSS is null. I've only tested it from my windows environment. (No Unix, Mac or others). I've only tested it on the last issue. But it worked. (and is documented in "perfect Spanglish" for future reviews) It "oficially" retrieves the last issue when launched. Best regards. |
09-11-2011, 10:37 AM | #4 | |
Member
Posts: 23
Karma: 12
Join Date: Jul 2011
Device: Cool-er
|
Quote:
I have reviewed the business week recipe (the one from Kovid Goyal and Darko Miletic, which is the one that works) It fails because business week is not consistent about how it writes its pages. I've had to change two thigs: At line 44: keep_only_tags = [dict(name='div', attrs={'id':['story-body','storyBody]})] for keep_only_tags = [dict(name='div', attrs={'id':['story-body','storyBody','article_body','articleBody']})] some of its pages have the main article under "StoryBody" DIV, but others are under "article_body" DIV (that is why they don't work) At line 92: rurl = url.replace('http://www.businessweek.com/','http://www.businessweek.com/print/') for if '/magazine' in url: rurl = url.replace('http://www.businessweek.com/','http://www.businessweek.com/printer/') else: rurl = url.replace('http://www.businessweek.com/','http://www.businessweek.com/print/') Some of its articles have a printer page whose name is built in a different way This way, the recipe continues to have some extra data (that needs to be deleted) but at least works. Hope that someone can make a better correction. For the moment I attach my changes just in case someone may find them useful. Best regards. |
|
09-11-2011, 12:14 PM | #5 |
Member
Posts: 23
Karma: 12
Join Date: Jul 2011
Device: Cool-er
|
I've had to make another change.
in print_version, I have changed if '/news/' in url or '/blog/ in url': for if '/news/' in url or '/blog/' in url: This was an error in the original recipe (or in my copy). Now it seems to be working well. Best regards |
Advert | |
|
09-11-2011, 05:38 PM | #6 |
Vox calibre
Posts: 412
Karma: 1175230
Join Date: Jan 2009
Device: Sony reader prs700, kobo
|
inquirer recipe is attached.
|
09-15-2011, 03:53 PM | #7 |
Zealot
Posts: 143
Karma: 387
Join Date: Sep 2010
Device: Kindle 3
|
Oh, terrific, thank you very much!
Thanxx, Mixx PS: I still think that it would be a good idea to have a place to flag the recipes that have an issue. |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
update for JBPress and NBOnline recipes. | adonishi | Recipes | 0 | 07-19-2011 03:14 AM |
won't update...after completing the update cycle edge returns to the first screen | WeAreBorrg | enTourage Archive | 2 | 03-18-2011 06:39 PM |
How can I update creation time for a title when I update the book info or convert it | setherd | Calibre | 3 | 10-30-2010 01:51 PM |
Firmware Update Can I reinstall the official amazon update after the update file from this site ? | yuenslhk | Amazon Kindle | 2 | 06-20-2010 11:24 AM |
Update on Google eBook Sales Plan Update | poohbear_nc | News | 6 | 05-05-2010 09:00 AM |