mirror of
				https://github.com/kovidgoyal/calibre.git
				synced 2025-11-03 19:17:02 -05:00 
			
		
		
		
	Fix NYTimes
This commit is contained in:
		
							parent
							
								
									bba7170153
								
							
						
					
					
						commit
						8af795d9dd
					
				@ -56,9 +56,12 @@ class NYTimes(BasicNewsRecipe):
 | 
			
		||||
    remove_tags_before = dict(id='article')
 | 
			
		||||
    remove_tags_after  = dict(id='article')
 | 
			
		||||
    remove_tags = [dict(attrs={'class':[
 | 
			
		||||
                            'articleFooter',
 | 
			
		||||
                            'articleInline runaroundLeft',
 | 
			
		||||
                            'articleTools',
 | 
			
		||||
                            'columnGroup doubleRule',
 | 
			
		||||
                            'columnGroup last',
 | 
			
		||||
                            'columnGroup  last',
 | 
			
		||||
                            'doubleRule',
 | 
			
		||||
                            'dottedLine',
 | 
			
		||||
                            'entry-meta',
 | 
			
		||||
@ -70,6 +73,7 @@ class NYTimes(BasicNewsRecipe):
 | 
			
		||||
                            'relatedSearchesModule',
 | 
			
		||||
                            'side_tool',
 | 
			
		||||
                            'singleAd',
 | 
			
		||||
                            'subNavigation tabContent active clearfix',
 | 
			
		||||
                            ]}),
 | 
			
		||||
                   dict(id=[
 | 
			
		||||
                            'adxLeaderboard',
 | 
			
		||||
@ -222,11 +226,11 @@ class NYTimes(BasicNewsRecipe):
 | 
			
		||||
 | 
			
		||||
            if div['class'] == 'section-headline':
 | 
			
		||||
                key = string.capwords(feed_title(div))
 | 
			
		||||
                if len(self.excludeSectionKeywords):
 | 
			
		||||
                    excluded = re.compile('|'.join(self.excludeSectionKeywords))
 | 
			
		||||
                    if excluded.search(key):
 | 
			
		||||
                        self.log("Skipping section %s" % key)
 | 
			
		||||
                        continue
 | 
			
		||||
 | 
			
		||||
                articles[key] = []
 | 
			
		||||
                ans.append(key)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user