Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Recipes

Notices

Reply
 
Thread Tools Search this Thread
Old 03-09-2013, 05:43 PM   #1
fontCrazee
Junior Member
fontCrazee began at the beginning.
 
Posts: 1
Karma: 10
Join Date: Mar 2013
Device: nook color
Incomplete magazines (Smithsonian, Scientific American)

i apologize if this question has been asked before: lately i'm not receiving many articles or any articles in the magazines i download using Calibre. specifically Smithsonian Mag, The New Yorker, Psychology Today and Scientific American. Are these no longer offered for free?
Thanks.
fontCrazee is offline   Reply With Quote
Old 03-09-2013, 08:44 PM   #2
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: 45,231
Karma: 27110894
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Many news websites lately are moving to using paywalls. Visit the website and check foryourself. It may just be that the website has changed and the recipe needs adjusting in calibre.
kovidgoyal is offline   Reply With Quote
Advert
Old 03-11-2013, 07:24 PM   #3
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
None of the mentioned magazines ever offered full content for free. They are just reducing the number of freely acailable articles.
kiklop74 is offline   Reply With Quote
Old 04-05-2013, 05:16 AM   #4
nhow
Member
nhow began at the beginning.
 
Posts: 14
Karma: 10
Join Date: Dec 2011
Device: Kindle
Quote:
Originally Posted by kovidgoyal View Post
Many news websites lately are moving to using paywalls. Visit the website and check foryourself. It may just be that the website has changed and the recipe needs adjusting in calibre.
I'm having the same problem with the New Yorker. Calibre downloads the online version but many articles do not show the text only a link to the online edition (where, if you click on it you can see the whole article). I checked the current recipe and it includes the code for showing articles where there's a link. I think that's what this is:

def preprocess_html(self, soup):
for item in soup.findAll(style=True):
del item['style']
auth = soup.find(attrs={'id':'articleauthor'})
if auth:
alink = auth.find('a')
if alink and alink.string is not None:
txt = alink.string
alink.replaceWith(txt)
return soup

I'm not very comfortable editing code but would try it if there's something new that would work.

Many thanks for your help.

Last edited by nhow; 04-05-2013 at 05:19 AM.
nhow is offline   Reply With Quote
Old 04-05-2013, 07:52 PM   #5
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 nhow View Post

def preprocess_html(self, soup):
This part of code does not download any additional content. I'm just not interested in updating the recipe. Too much work for free.
kiklop74 is offline   Reply With Quote
Advert
Old 04-05-2013, 09:41 PM   #6
rainrdx
Connoisseur
rainrdx can differentiate black from dark navy bluerainrdx can differentiate black from dark navy bluerainrdx can differentiate black from dark navy bluerainrdx can differentiate black from dark navy bluerainrdx can differentiate black from dark navy bluerainrdx can differentiate black from dark navy bluerainrdx can differentiate black from dark navy bluerainrdx can differentiate black from dark navy bluerainrdx can differentiate black from dark navy bluerainrdx can differentiate black from dark navy bluerainrdx can differentiate black from dark navy blue
 
Posts: 55
Karma: 13316
Join Date: Jul 2012
Device: iPad
With the exception of Smithsonian, all other three publish an increasingly smaller number of their articles online (New Yorker publishes their articles in a flash-based archive, I believe, which makes making a recipe incredibly hard, if not theoretically impossible). Unless they change their policy, there is not much can be done, I think.

Last edited by rainrdx; 04-05-2013 at 09:44 PM.
rainrdx is offline   Reply With Quote
Old 04-06-2013, 07:46 AM   #7
nhow
Member
nhow began at the beginning.
 
Posts: 14
Karma: 10
Join Date: Dec 2011
Device: Kindle
Quote:
Originally Posted by kiklop74 View Post
This part of code does not download any additional content. I'm just not interested in updating the recipe. Too much work for free.
I can understand that. I'm really grateful to you and all who have built and maintained this software. So I'll give another contribution.

Thank you.
nhow is offline   Reply With Quote
Old 07-24-2013, 09:07 PM   #8
oneillpt
Connoisseur
oneillpt began at the beginning.
 
Posts: 63
Karma: 46
Join Date: Feb 2011
Device: Kindle 3 (cracked screen!); PW1; Oasis
Scientific American still provides content, but the recipe needs a fix:

Replace
Code:
for a in soup.find(attrs={'class':'primaryCol'}).findAll('a',attrs={'title':'Feature'}):
by
Code:
for a in soup.find(attrs={'class':'doubleWide'}).find(attrs={'class':'primaryCol'}).findAll('a',attrs={'title':'Feature'}):
This should be sufficient to get the recipe working again. If you wish you can also clean up articles a little more by replacing the remove_tags by:
Code:
remove_tags = [dict(name='a', attrs={'class':'tinyCommentCount'})
                                ,dict(name='div', attrs={'id':'bigCoverModule'})
                                ,dict(name='div', attrs={'class':'addInfo'})
                                ]
oneillpt is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Scientific American Recipe broken Mixx Recipes 5 09-18-2012 02:01 AM
Best reader for Scientific American Digital Banner Which one should I buy? 0 06-23-2011 02:26 AM
Scientific American Starson17 Recipes 13 09-25-2010 03:37 PM
Scientific American recipe Stingo Calibre 2 10-30-2009 05:42 PM
Scientific American E-Ink Article wallcraft News 1 05-28-2008 11:59 AM


All times are GMT -4. The time now is 10:55 PM.


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