mirror of
				https://github.com/kovidgoyal/calibre.git
				synced 2025-11-03 19:17:02 -05:00 
			
		
		
		
	pep8
This commit is contained in:
		
							parent
							
								
									397fe04839
								
							
						
					
					
						commit
						8959ada93f
					
				@ -19,7 +19,7 @@ __copyright__ = '2021, Loïc Houpert <houpertloic at gmail .com>. Adapted from:
 | 
				
			|||||||
Mediapart
 | 
					Mediapart
 | 
				
			||||||
'''
 | 
					'''
 | 
				
			||||||
 | 
					
 | 
				
			||||||
from datetime import date, datetime, timezone, timedelta
 | 
					from datetime import datetime, timezone, timedelta
 | 
				
			||||||
from calibre.ptempfile import PersistentTemporaryFile
 | 
					from calibre.ptempfile import PersistentTemporaryFile
 | 
				
			||||||
from calibre.web.feeds.news import BasicNewsRecipe, classes
 | 
					from calibre.web.feeds.news import BasicNewsRecipe, classes
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -30,7 +30,7 @@ class Mediapart(BasicNewsRecipe):
 | 
				
			|||||||
    publication_type = 'newspaper'
 | 
					    publication_type = 'newspaper'
 | 
				
			||||||
    language = 'fr'
 | 
					    language = 'fr'
 | 
				
			||||||
    needs_subscription = True
 | 
					    needs_subscription = True
 | 
				
			||||||
    
 | 
					
 | 
				
			||||||
    use_embedded_content = False
 | 
					    use_embedded_content = False
 | 
				
			||||||
    no_stylesheets = True
 | 
					    no_stylesheets = True
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -39,12 +39,12 @@ class Mediapart(BasicNewsRecipe):
 | 
				
			|||||||
            'news__heading__top news__heading__center news__body__center__article'
 | 
					            'news__heading__top news__heading__center news__body__center__article'
 | 
				
			||||||
        )
 | 
					        )
 | 
				
			||||||
    ]
 | 
					    ]
 | 
				
			||||||
    
 | 
					
 | 
				
			||||||
    remove_tags = [
 | 
					    remove_tags = [
 | 
				
			||||||
        classes('action-links media--rich read-also login-subscribe print-source_url'),
 | 
					        classes('action-links media--rich read-also login-subscribe print-source_url'),
 | 
				
			||||||
        dict(name='svg'),
 | 
					        dict(name='svg'),
 | 
				
			||||||
    ]
 | 
					    ]
 | 
				
			||||||
    
 | 
					
 | 
				
			||||||
    conversion_options = {'smarten_punctuation': True}
 | 
					    conversion_options = {'smarten_punctuation': True}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    masthead_url = "https://raw.githubusercontent.com/lhoupert/calibre_contrib/main/mediapart_masthead.png"
 | 
					    masthead_url = "https://raw.githubusercontent.com/lhoupert/calibre_contrib/main/mediapart_masthead.png"
 | 
				
			||||||
@ -52,7 +52,7 @@ class Mediapart(BasicNewsRecipe):
 | 
				
			|||||||
    ignore_duplicate_articles = {'title'}
 | 
					    ignore_duplicate_articles = {'title'}
 | 
				
			||||||
    resolve_internal_links  = True
 | 
					    resolve_internal_links  = True
 | 
				
			||||||
    remove_empty_feeds = True
 | 
					    remove_empty_feeds = True
 | 
				
			||||||
    
 | 
					
 | 
				
			||||||
    articles_are_obfuscated = True
 | 
					    articles_are_obfuscated = True
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def get_obfuscated_article(self, url):
 | 
					    def get_obfuscated_article(self, url):
 | 
				
			||||||
@ -170,4 +170,4 @@ class Mediapart(BasicNewsRecipe):
 | 
				
			|||||||
        except Exception:
 | 
					        except Exception:
 | 
				
			||||||
            self.log.exception('Failed to generate default cover')
 | 
					            self.log.exception('Failed to generate default cover')
 | 
				
			||||||
            return False
 | 
					            return False
 | 
				
			||||||
        return True
 | 
					        return True
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user