mirror of
				https://github.com/kovidgoyal/calibre.git
				synced 2025-11-01 19:17:02 -04:00 
			
		
		
		
	Fix LWN and Cicero (DE)
This commit is contained in:
		
							parent
							
								
									c1ec35f2d2
								
							
						
					
					
						commit
						53f0f353c4
					
				| @ -1,13 +1,14 @@ | |||||||
| from calibre.web.feeds.news import BasicNewsRecipe | from calibre.web.feeds.news import BasicNewsRecipe | ||||||
| 
 | 
 | ||||||
| class BasicUserRecipe1316245412(BasicNewsRecipe): | class BasicUserRecipe1316245412(BasicNewsRecipe): | ||||||
|  |     #from calibre.utils.magick import Image, PixelWand | ||||||
|     title = u'Cicero Online' |     title = u'Cicero Online' | ||||||
|     description = u'Magazin f\xfcr politische Kultur' |     description = u'Magazin f\xfcr politische Kultur (RSS Version)' | ||||||
|     publisher = 'Ringier Publishing GmbH' |     publisher = 'Ringier Publishing GmbH' | ||||||
|     category = 'news, politics, Germany' |     category = 'news, politics, Germany' | ||||||
|     language = 'de' |     language = 'de' | ||||||
|     encoding = 'UTF-8' |     encoding = 'UTF-8' | ||||||
|     __author__ = 'Armin Geller' # Upd. 2011-09-19 |     __author__ = 'Armin Geller' # Upd. 2011-09-23 | ||||||
| 
 | 
 | ||||||
|     oldest_article        = 7 |     oldest_article        = 7 | ||||||
|     max_articles_per_feed = 100 |     max_articles_per_feed = 100 | ||||||
| @ -18,16 +19,20 @@ class BasicUserRecipe1316245412(BasicNewsRecipe): | |||||||
| 
 | 
 | ||||||
|     remove_tags = [ |     remove_tags = [ | ||||||
|                     dict(name='div', attrs={'id':["header", "navigation", "skip-link", "header-print", "header-print-url", "meta-toolbar", "footer"]}), |                     dict(name='div', attrs={'id':["header", "navigation", "skip-link", "header-print", "header-print-url", "meta-toolbar", "footer"]}), | ||||||
|                     dict(name='div', attrs={'class':["region region-sidebar-first column sidebar", "breadcrumb", "breadcrumb-title", "meta", "comment-wrapper", |                     dict(name='div', attrs={'class':["region region-sidebar-first column sidebar", "breadcrumb", | ||||||
|                                                         "field field-name-field-show-teaser-right field-type-list-boolean field-label-above"]}), |                                                       "breadcrumb-title", "meta", "comment-wrapper", | ||||||
|  |                                                       "field field-name-field-show-teaser-right field-type-list-boolean field-label-above", | ||||||
|  |                                                       "page-header", | ||||||
|  |                                                       "view view-alle-karikaturen view-id-alle_karikaturen view-display-id-default view-dom-id-1", | ||||||
|  |                                                       "pagination", | ||||||
|  |                                                       "view view-letzte-videos view-id-letzte_videos view-display-id-default view-dom-id-1", | ||||||
|  |                                                       "view view-letzte-videos view-id-letzte_videos view-display-id-default view-dom-id-2", # 2011-09-23 | ||||||
|  |                                                       "view view-alle-karikaturen view-id-alle_karikaturen view-display-id-default view-dom-id-2", # 2011-09-23 | ||||||
|  |                                                       ]}), | ||||||
|                     dict(name='div', attrs={'title':["Dossier Auswahl"]}), |                     dict(name='div', attrs={'title':["Dossier Auswahl"]}), | ||||||
|                     dict(name='h2', attrs={'class':["title comment-form"]}), |                     dict(name='h2', attrs={'class':["title comment-form"]}), | ||||||
|                     dict(name='form', attrs={'class':["comment-form user-info-from-cookie"]}), |                     dict(name='form', attrs={'class':["comment-form user-info-from-cookie"]}), | ||||||
|                     # 2011-09-19 clean-up on first feed historical caricature- and video preview pictures and social icons |                     dict(name='table', attrs={'class':["mcx-social-horizontal", "page-header"]}), | ||||||
|                     dict(name='table', attrs={'class':["mcx-social-horizontal", "page-header"]}),   # 2011-09-19 |  | ||||||
|                     dict(name='div', attrs={'class':["page-header", "view view-alle-karikaturen view-id-alle_karikaturen view-display-id-default view-dom-id-1", |  | ||||||
|                                                       "pagination", |  | ||||||
|                                                       "view view-letzte-videos view-id-letzte_videos view-display-id-default view-dom-id-1"]}), # 2011-09-19 |  | ||||||
|                    ] |                    ] | ||||||
| 
 | 
 | ||||||
|     feeds = [ |     feeds = [ | ||||||
|  | |||||||
| @ -95,7 +95,7 @@ class WeeklyLWN(BasicNewsRecipe): | |||||||
|                 break |                 break | ||||||
| 
 | 
 | ||||||
|             article = dict( |             article = dict( | ||||||
|                 title=tag_title.string, |                 title=self.tag_to_string(tag_title), | ||||||
|                 url= 'http://lwn.net' + tag_url['href'].split('#')[0] + '?format=printable', |                 url= 'http://lwn.net' + tag_url['href'].split('#')[0] + '?format=printable', | ||||||
|                 description='', content='', date='') |                 description='', content='', date='') | ||||||
|             articles[section].append(article) |             articles[section].append(article) | ||||||
|  | |||||||
| @ -294,7 +294,7 @@ To learn more about writing advanced recipes using some of the facilities, avail | |||||||
|     `BasicNewsRecipe <http://bazaar.launchpad.net/~kovid/calibre/trunk/annotate/head:/src/calibre/web/feeds/news.py>`_ |     `BasicNewsRecipe <http://bazaar.launchpad.net/~kovid/calibre/trunk/annotate/head:/src/calibre/web/feeds/news.py>`_ | ||||||
|         The source code of ``BasicNewsRecipe`` |         The source code of ``BasicNewsRecipe`` | ||||||
| 
 | 
 | ||||||
|     `Built-in recipes <http://bazaar.launchpad.net/~kovid/calibre/trunk/files/head:/src/calibre/web/feeds/recipes/>`_ |     `Built-in recipes <http://bazaar.launchpad.net/~kovid/calibre/trunk/files/head:/recipes/>`_ | ||||||
|         The source code for the built-in recipes that come with |app| |         The source code for the built-in recipes that come with |app| | ||||||
| 
 | 
 | ||||||
|     `The calibre recipes forum <http://www.mobileread.com/forums/forumdisplay.php?f=228>`_ |     `The calibre recipes forum <http://www.mobileread.com/forums/forumdisplay.php?f=228>`_ | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user