Register Guidelines E-Books Search Today's Posts Mark Forums Read

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

Notices

Reply
 
Thread Tools Search this Thread
Old 01-09-2014, 07:01 AM   #1
me1969
Junior Member
me1969 began at the beginning.
 
Posts: 5
Karma: 10
Join Date: Jan 2014
Device: kindle
FAZ.net now with multipages

Hello,

faz.net has changed its format and shows now articles with multipages.
I have found this post for a solution: http://www.mobileread.com/forums/sho...1&postcount=17

But unfortunately I am not familiar with coding. Can anybody help?

Here's the faz.net recipe:
__license__ = 'GPL v3'
__copyright__ = '2008-2011, Kovid Goyal <kovid at kovidgoyal.net>, Darko Miletic <darko at gmail.com>'
'''
Profile to download FAZ.NET
'''

from calibre.web.feeds.news import BasicNewsRecipe

class FazNet(BasicNewsRecipe):
title = 'FAZ.NET'
__author__ = 'Kovid Goyal, Darko Miletic'
description = 'Frankfurter Allgemeine Zeitung'
publisher = 'Frankfurter Allgemeine Zeitung GmbH'
category = 'news, politics, Germany'
use_embedded_content = False
language = 'de'

max_articles_per_feed = 30
no_stylesheets = True
encoding = 'utf-8'
remove_javascript = True

keep_only_tags = [{'class':'FAZArtikelEinleitung'},
{'id':'ArtikelTabContent_0'}]

remove_tags_after = dict(name='div', attrs={'class':['ArtikelFooter']}) # AGe add 2013-12-19
remove_tags = [dict(name='div', attrs={'class':['ArtikelFooter']})] # AGe add 2013-12-19


feeds = [
('FAZ.NET Aktuell', 'http://www.faz.net/aktuell/?rssview=1'),
('Politik', 'http://www.faz.net/aktuell/politik/?rssview=1'),
('Wirtschaft', 'http://www.faz.net/aktuell/wirtschaft/?rssview=1'),
('Feuilleton', 'http://www.faz.net/aktuell/feuilleton/?rssview=1'),
('Sport', 'http://www.faz.net/aktuell/sport/?rssview=1'),
('Lebensstil', 'http://www.faz.net/aktuell/lebensstil/?rssview=1'), # AGe add 2013-12-19
('Gesellschaft', 'http://www.faz.net/aktuell/gesellschaft/?rssview=1'),
('Finanzen', 'http://www.faz.net/aktuell/finanzen/?rssview=1'),
('Technik & Motor', 'http://www.faz.net/aktuell/technik-motor/?rssview=1'),
('Wissen', 'http://www.faz.net/aktuell/wissen/?rssview=1'),
('Reise', 'http://www.faz.net/aktuell/reise/?rssview=1'),
('Beruf & Chance', 'http://www.faz.net/aktuell/beruf-chance/?rssview=1'),
('Rhein-Main', 'http://www.faz.net/aktuell/rhein-main/?rssview=1')
]



Thanks!
Markus
me1969 is offline   Reply With Quote
Old 01-09-2014, 08:01 AM   #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: 26,125
Karma: 5381911
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
https://github.com/kovidgoyal/calibr...59854f4664a243
kovidgoyal is offline   Reply With Quote
Old 01-09-2014, 08:41 AM   #3
me1969
Junior Member
me1969 began at the beginning.
 
Posts: 5
Karma: 10
Join Date: Jan 2014
Device: kindle
Thanks a lot, Kovid!
Donation is coming, too ;-)
me1969 is offline   Reply With Quote
Old 01-09-2014, 03:53 PM   #4
Divingduck
Fanatic
Divingduck never is beset by a damp, drizzly November in his or her soul.Divingduck never is beset by a damp, drizzly November in his or her soul.Divingduck never is beset by a damp, drizzly November in his or her soul.Divingduck never is beset by a damp, drizzly November in his or her soul.Divingduck never is beset by a damp, drizzly November in his or her soul.Divingduck never is beset by a damp, drizzly November in his or her soul.Divingduck never is beset by a damp, drizzly November in his or her soul.Divingduck never is beset by a damp, drizzly November in his or her soul.Divingduck never is beset by a damp, drizzly November in his or her soul.Divingduck never is beset by a damp, drizzly November in his or her soul.Divingduck never is beset by a damp, drizzly November in his or her soul.
 
Posts: 559
Karma: 59934
Join Date: Nov 2010
Location: Germany
Device: Sony PRS-650
Wow Kovid, this is an impressive two liner. Is this new?

I made just a test in the recipe. If there is a multipage, the jump from page one to page two works perfect with the internal page link. But on page two and following pages, the links refers to the original internet pages instead of the internal pages.
Picture one show the links for page one, picture 2 shows the links on top of page two and picture 2 shows the bottom links for page two. Same issue for next pages.

Is there a solution to fix this?

Edit: I used this article for the test:
Die NSA und der Quantencomputer
Attached Thumbnails
Click image for larger version

Name:	Aufzeichnen.JPG
Views:	52
Size:	210.2 KB
ID:	117768   Click image for larger version

Name:	Aufzeichnen1.JPG
Views:	35
Size:	133.9 KB
ID:	117769   Click image for larger version

Name:	Aufzeichnen2.JPG
Views:	54
Size:	182.6 KB
ID:	117770  

Last edited by Divingduck; 01-09-2014 at 03:58 PM.
Divingduck is offline   Reply With Quote
Old 01-09-2014, 09:56 PM   #5
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: 26,125
Karma: 5381911
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
No, it has always been present. I didn't bother to remove the next page sections, you should do that via postprocess_html, something like this

def postprocess_html(self, soup, first_fetch):
for div in soup.findAll(id='next_page_whatever'):
div.extract()
return soup
kovidgoyal is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
FAZ-Net Update Divingduck Recipes 9 Today 04:10 PM
creating a recipe for faz.net's e-paper MayJune Recipes 1 10-02-2013 11:07 PM
FAZ.NET recipe fails due to website redesign juco Recipes 7 10-07-2011 11:53 AM
FAZ.NET: Website-Redesign macht das calibre-Rezept wertlos juco Software 1 10-05-2011 02:42 AM
recipe for FAZ.net - german schuster Recipes 10 05-28-2011 12:13 AM


All times are GMT -4. The time now is 07:27 PM.


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