Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 07-13-2009, 12:52 AM   #1
p3aul
Captain Courageous
p3aul doesn't litterp3aul doesn't litter
 
p3aul's Avatar
 
Posts: 239
Karma: 102
Join Date: Apr 2009
Device: calibre, PRS 505
Wink Adding Newsfeeds to Calibre

Hi!
I'm having trouble adding a newsfeed to Calbre. Here's what I have done and the resukts I got.

[1] Browsed to the NOAA website, clicked on Red/White XML button.

[2] Copied the URL to the clipboard.

[3] In Calibre, I clicked on "Add A Custom News Source"

[4] In the dialog I chose the Feed Title and the Recipe Title as "NOAA"

[5] Pasted the Feed URL into the box.

[6] Clicked on "Add Feed" and "Add/Update Recipe"

[7] Closed the dialog and chose Schedule news Download"

[8] In the dialog, Clicked on Custom->NOAA Download Now.

[9] Selected NOAA to view.

[10] result 3 pages page 3 just said Failed.

Tried again, same steps, but used the URL of the website.

Result: 21 pages all HTML.


Paul

RESULT:
p3aul is offline   Reply With Quote
Old 07-13-2009, 08:44 PM   #2
kiklop74
Guru
kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.
 
kiklop74's Avatar
 
Posts: 800
Karma: 194644
Join Date: Dec 2007
Location: Argentina
Device: Kindle Voyage
This site requires more advanced recipe. Like this one:
Attached Files
File Type: zip noaa.zip (1.7 KB, 290 views)
kiklop74 is offline   Reply With Quote
Advert
Old 07-14-2009, 02:27 PM   #3
p3aul
Captain Courageous
p3aul doesn't litterp3aul doesn't litter
 
p3aul's Avatar
 
Posts: 239
Karma: 102
Join Date: Apr 2009
Device: calibre, PRS 505
Thanks, that works but it's a bit of overkill. How can I modify it so it only gets my local weather? This is the main website:
http://forecast.weather.gov/MapClick...2=-83.6313&e=0

This the website that comes up when I click on XML:
http://forecast.weather.gov/MapClick...&FcstType=dwml

If you could give me this code it sure would be much appreciated!
Thanks,
Paul
p3aul is offline   Reply With Quote
Old 07-14-2009, 02:31 PM   #4
kiklop74
Guru
kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.
 
kiklop74's Avatar
 
Posts: 800
Karma: 194644
Join Date: Dec 2007
Location: Argentina
Device: Kindle Voyage
Quote:
Originally Posted by p3aul View Post
Thanks, that works but it's a bit of overkill. How can I modify it so it only gets my local weather? This is the main website:
http://forecast.weather.gov/MapClick...2=-83.6313&e=0

This the website that comes up when I click on XML:
http://forecast.weather.gov/MapClick...&FcstType=dwml

If you could give me this code it sure would be much appreciated!
Thanks,
Paul
That is completely different kind of content and much more complex recipe is needed. Right now I do not have time to do that nor can I tell you when will I have such time.
kiklop74 is offline   Reply With Quote
Old 07-14-2009, 02:57 PM   #5
p3aul
Captain Courageous
p3aul doesn't litterp3aul doesn't litter
 
p3aul's Avatar
 
Posts: 239
Karma: 102
Join Date: Apr 2009
Device: calibre, PRS 505
Unhappy

Why did Kovid even include something in the application that the average person can't comprehend? It makes no sense to me to have a feature that doesn't work without extensive programming experience.
Paul
p3aul is offline   Reply With Quote
Advert
Old 07-14-2009, 03:12 PM   #6
kiklop74
Guru
kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.kiklop74 can program the VCR without an owner's manual.
 
kiklop74's Avatar
 
Posts: 800
Karma: 194644
Join Date: Dec 2007
Location: Argentina
Device: Kindle Voyage
Quote:
Originally Posted by p3aul View Post
Why did Kovid even include something in the application that the average person can't comprehend? It makes no sense to me to have a feature that doesn't work without extensive programming experience.
Paul
Web scraping is a complex topic and calibre's framework by default covers only basic cases. It would be fairly difficult and time consuming to create something more user friendly. It can be done but since this is non-profit project it will be done (or not) when Kovid or somebody else decides to work on that.

What you can do in this particular case is following:
1. Calibre has a recipe for instapaper.com which is a great tool for scraping web pages.
2. Go to instapaper.com and open an account, make sure to set password (it is required by calibre)
2a. Make sure to uncheck "Automatically move articles to the Archive when I read them" on instapaper.com
3. Once logged in your instapaper.com account look at the "read later" button on the frontpage. Drag that button to the favorites in your browser.




4. Open now in the same browser your weather forecast and click on the read later link in your favorites.
5. You just added the weather forecast page to your instapaper feed.
6. Now open calibre and locate the instapaper.com recipe and enter your credentials
7. Get the news and you will have as a result your weather forecast page in calibre.

With this approach you can download with calibre any static page without any coding.
Attached Thumbnails
Click image for larger version

Name:	dragthis.png
Views:	971
Size:	4.9 KB
ID:	32300  

Last edited by kiklop74; 07-14-2009 at 03:16 PM.
kiklop74 is offline   Reply With Quote
Old 07-14-2009, 03:30 PM   #7
p3aul
Captain Courageous
p3aul doesn't litterp3aul doesn't litter
 
p3aul's Avatar
 
Posts: 239
Karma: 102
Join Date: Apr 2009
Device: calibre, PRS 505
That worked great!

Paul
p3aul is offline   Reply With Quote
Old 10-23-2009, 03:00 AM   #8
seanrose
Junior Member
seanrose began at the beginning.
 
Posts: 9
Karma: 10
Join Date: Sep 2009
Device: Sony PRS-505
Thanks! This is just what I was looking for.
seanrose is offline   Reply With Quote
Old 10-23-2009, 12:33 PM   #9
moosejons_dad
Zealot
moosejons_dad began at the beginning.
 
Posts: 100
Karma: 18
Join Date: Oct 2006
Location: N.J.
Device: Sony Readers PRS-500 exchanged by Sony for PRS-600, PRS-505,IPAD3,mini
Can the news feed for the Wall Street Journal be checked as it seems to hang up when it is 47% downloaded. I am using 6.19 on Calibre.

Thanks in advance.
moosejons_dad is offline   Reply With Quote
Old 10-23-2009, 12:37 PM   #10
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,854
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
I don't subscribe to WSJ so I can't check it.
kovidgoyal is online now   Reply With Quote
Old 08-20-2010, 08:39 AM   #11
olaf
Enthusiast
olaf is on a distinguished road
 
Posts: 43
Karma: 50
Join Date: May 2009
Device: Kindle3
My local newspaper just went to a pay-for-online-content model which requires paper subscribers to enter a userid/password to view local articles. I am a subscriber, and have the userid/password (which I have entered on the 'Fetch News' screen), but I still get errors when running the recipe (to which I've added "needs_subscription=True"). Do I need to add other specialized code to the recipe for this to work? I get a lot of the paper, but links to the local section don't go to the articles - they go to random other spots.
------------------------

import string, re

class Telegram(BasicNewsRecipe):
title = 'Telegram'
oldest_article = 2
timefmt = ''
max_articles_per_feed = 100
no_stylesheets = False
use_embedded_content = False
encoding = 'cp1252'
needs_subscription = True
publication_type = 'newspaper'
remove_empty_feeds = True
extra_css = ' body{font-family: Verdana,sans-serif} .headline{font-size: xx-large; font-weight: bold} .mainPhotoCaption{font-size: x-small} '

keep_only_tags = [dict(name='div', attrs={'id':'articleWell'})]
remove_tags_before = dict(attrs={'class':'headline'})
remove_tags_after = dict(attrs={'id':'zoom1'})
remove_tags = [
dict(name='div', attrs={'class':'relatedContent'})
,dict(name=['object','link','iframe'])
]

feeds = [(u'Front Page News', u'http://www.telegram.com/apps/pbcs.dll/section?Category=RSS03&MIME=xml'),
(u'World & Regional', u'http://www.telegram.com/apps/pbcs.dll/section?Category=rss01&MIME=xml&profile=1052'),
(u'Living', u'http://www.telegram.com/apps/pbcs.dll/section?Category=rss01&MIME=xml&profile=1011'),
(u'Local News', u'http://www.telegram.com/apps/pbcs.dll/section?Category=rss01&MIME=xml&profile=1101'),
(u'Business', u'http://www.telegram.com/apps/pbcs.dll/section?Category=rss01&MIME=xml&profile=1002'),
(u'Opinion', u'http://www.telegram.com/apps/pbcs.dll/section?Category=rss01&MIME=xml&profile=1017'),
(u'Deaths', u'http://www.telegram.com/apps/pbcs.dll/section?Category=rss01&MIME=xml&profile=1001'),
(u'Sports', u'http://telegram.com/apps/pbcs.dll/section?Category=rss01&MIME=xml&profile=1009'),
(u'Court Records', u'http://www.telegram.com/apps/pbcs.dll/section?Category=rss01&MIME=xml&profile=1056'),
(u'As I See It', u'http://www.telegram.com/apps/pbcs.dll/section?Category=rss01&MIME=xml&profile=1054')]

Last edited by olaf; 08-20-2010 at 08:44 AM.
olaf is offline   Reply With Quote
Old 08-20-2010, 11:48 AM   #12
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,854
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
yes, you need to write the code to login. Look in the user manual it has examples of this.
kovidgoyal is online now   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Remove navbar in newsfeeds for Kindle/mobi [calibre] TWiTCommander Calibre 13 07-28-2010 03:09 PM
035k and Calibre newsfeeds jerrywojo Ectaco jetBook 2 07-25-2010 03:18 AM
Calibre Freezing When Adding New Books Nilam Calibre 4 07-18-2010 10:03 PM
How Fast is Calibre in ADDING books? tINmOUSE Calibre 2 07-07-2008 12:29 PM
Problems with downloading newsfeeds in Calibre Tom Swift Calibre 9 06-05-2008 12:03 AM


All times are GMT -4. The time now is 09:04 AM.


MobileRead.com is a privately owned, operated and funded community.