![]() |
#2566 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 800
Karma: 194644
Join Date: Dec 2007
Location: Argentina
Device: Kindle Voyage
|
New recipe for Mexican newspaper La Jornada :
|
![]() |
![]() |
#2567 |
Addict
![]() Posts: 264
Karma: 62
Join Date: May 2010
Device: kindle 2, kindle 3, Kindle fire
|
Starson17,
I went back to the Gocomic recipe and tried to follow what you were doing and using what you stated about printing the title, url and so forth. The code I have currently it gets the soup as indicated in the output.txt file but then it craps out saying the index is out of range. I thought that was why you put number of pages to get in a range field. I set mine to 7 as you can see in my code but again I get index out or range.... ![]() Spoiler:
This is like playing battleship, I'm firing and firing and I get close but not getting a direct hit. |
![]() |
![]() |
#2568 |
Member
![]() ![]() ![]() ![]() ![]() ![]() Posts: 24
Karma: 540
Join Date: Aug 2010
Device: Kindle 3
|
instructables
Tried to put a recipe together for instructables.
So far so good, but can not tidy the final output up nicely. (Some ads and some bad css) Spoiler:
Any pointers to where I am going wrong ? |
![]() |
![]() |
#2569 |
Member
![]() ![]() ![]() ![]() ![]() ![]() Posts: 24
Karma: 540
Join Date: Aug 2010
Device: Kindle 3
|
Hackaday
First recipe for me.
Spoiler:
|
![]() |
![]() |
#2570 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
|
Quote:
Look at this: Spoiler:
It does all the url scraping for the feed. (You can add more feeds if you want) It's up to you to remove the junk with keep or remove tags. Last edited by Starson17; 08-31-2010 at 02:17 PM. |
|
![]() |
![]() |
#2571 | |
Addict
![]() Posts: 264
Karma: 62
Join Date: May 2010
Device: kindle 2, kindle 3, Kindle fire
|
Quote:
man I tell you you make it look so easy... I hope I can learn from this. What I'm considering doing is when someone has a request try to do it. And then if someone like yourself or someone else post the recipe see how they came about it and learn from it.... I can't thank you enough |
|
![]() |
![]() |
#2572 |
Addict
![]() Posts: 264
Karma: 62
Join Date: May 2010
Device: kindle 2, kindle 3, Kindle fire
|
Field and Stream Blog Hunting fishing gun and fly talk
With the much appreciated help from Starson17 here is the field and stream blogs. I just took and added a few more feeds to the recipe and removed the junk.
Thanks again. Last edited by TonytheBookworm; 08-30-2010 at 11:02 PM. Reason: Added favicon per dwanthny's suggestion |
![]() |
![]() |
#2573 | |
US Navy, Retired
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 9,890
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Kindle PaperWhite SE 11th Gen
|
Quote:
One site I use to grab the favicon is http://www.getfavicon.org/ it allows you to enter a url and it will grab the favicon from that site. |
|
![]() |
![]() |
#2574 |
Junior Member
![]() Posts: 3
Karma: 10
Join Date: Aug 2010
Device: Nook
|
Recipe for Heavens-Above.com
I was trying to create a recipe for http://www.heavens-above.com, excellent Astronomy website where you can see the predictions of satellite positions, as will be seen from your city.
The problem is that the site offers no feeds. Nonetheless, I could create something pretty close. I could download some content, but appear as html code, not as text. This is the recipe as far as it went. The user login is not required to access any of the pages, but if you logger all pages display the information as seen from your city. Code:
__license__ = 'GPL v3' __copyright__ = '2010, Lucas Dasso <dassolucas@***********>' ''' Heavens-Above.com ''' from calibre.web.feeds.news import BasicNewsRecipe class HeavensAbove(BasicNewsRecipe): title = u'Heavens Above' description = 'Satellite, ISS, and Space Shuttle orbital pass predictions, maps, and star charts.' __author__ = ' Lucas Dasso' language = 'en' remove_javascript=True # needs_subscription = True feeds = [(u'ISS', u'http://www.heavens-above.com/PassSummary.aspx?satid=25544&Session=kebgfefchfldhfpnimillnlb') ,(u'X-37B',u'http://www.heavens-above.com/PassSummary.aspx?satid=36514&Session=kebgfefchfldhfpnimillnlb') ,(u'Genesis I',u'http://www.heavens-above.com/PassSummary.aspx?satid=29252&Session=kebgfefchfldhfpnimillnlb') ,(u'GENESIS II',u'http://www.heavens-above.com/PassSummary.aspx?satid=31789&Session=kebgfefchfldhfpnimillnlb') ,(u'Envisat',u'http://www.heavens-above.com/PassSummary.aspx?satid=27386&Session=kebgfefchfldhfpnimillnlb') ,(u'Hubble Space Telescope',u'http://www.heavens-above.com/PassSummary.asp?satid=20580&Session=kebgfefchfldhfpnimillnlb') ,(u'Satellites brighter than magnitude 3.5 (daily)',u'http://www.heavens-above.com/allsats.asp?Mag=3.5&Session=kebgfefchfldhfpnimillnlb') ,(u'Iridium Flares (next 7 days)',u'http://www.heavens-above.com/iridium.asp?Dur=7&Session=kebgfefchfldhfpnimillnlb') ] # def get_browser(self): # br = BasicNewsRecipe.get_browser() # if self.username is not None and self.password is not None: # br.open('http://www.heavens-above.com/logon.asp') # br.select_form(nr = 0) # br['UserName'] = self.username # br['Password'] = self.password # br.submit() # return br |
![]() |
![]() |
#2575 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
|
Quote:
|
|
![]() |
![]() |
#2576 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
|
Quote:
Note that I left all the print statements in. My recipes are filled with those, then I search for the prints in the text file to make sure the recipe is doing what I want at each step. |
|
![]() |
![]() |
#2577 |
Junior Member
![]() Posts: 2
Karma: 10
Join Date: Aug 2010
Device: Kindle 3
|
hi, i've been lurking around for a while but figured i probably should participate.
![]() i created a small recipe of my hometown newspaper, The Winnipeg Free Press (http://www.winnipegfreepress.com), that seems to work well for me so i thought i'd share it here. i'm a total noob when it comes to python so please forgive the roughness of the code. ![]() Spoiler:
i'm also working on a recipe for my favourite gossip site *blush* (http://www2.laineygossip.com/). while i've managed to get the articles just fine, i can't seem to get it to show the thumbnail images at the bottom... i was wondering if someone could give me some advice on this? I'd greatly appreciate it! Spoiler:
|
![]() |
![]() |
#2578 |
Addict
![]() Posts: 264
Karma: 62
Join Date: May 2010
Device: kindle 2, kindle 3, Kindle fire
|
is there a better editor "free" than geany for python ? I swear these indents are driving me nuts. I was hoping there was some kinda compiler or whatever that would bark at me so I could ee what the issue actually was.
![]() |
![]() |
![]() |
#2579 |
Addict
![]() Posts: 264
Karma: 62
Join Date: May 2010
Device: kindle 2, kindle 3, Kindle fire
|
got it nm, wish there was a delete on here
![]() Last edited by TonytheBookworm; 08-31-2010 at 02:05 PM. Reason: strange had white space in there that wasn't visible :( |
![]() |
![]() |
#2580 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
|
|
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Custom column read ? | pchrist7 | Calibre | 2 | 10-04-2010 02:52 AM |
Archive for custom screensavers | sleeplessdave | Amazon Kindle | 1 | 07-07-2010 12:33 PM |
How to back up preferences and custom recipes? | greenapple | Calibre | 3 | 03-29-2010 05:08 AM |
Donations for Custom Recipes | ddavtian | Calibre | 5 | 01-23-2010 04:54 PM |
Help understanding custom recipes | andersent | Calibre | 0 | 12-17-2009 02:37 PM |