mirror of
				https://github.com/kovidgoyal/calibre.git
				synced 2025-11-03 19:17:02 -05:00 
			
		
		
		
	New recipe for The Dallas Morning News by Krittika Goyal
This commit is contained in:
		
							parent
							
								
									8f53391d98
								
							
						
					
					
						commit
						bf0777e55b
					
				
							
								
								
									
										28
									
								
								resources/recipes/dallas.recipe
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										28
									
								
								resources/recipes/dallas.recipe
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,28 @@
 | 
				
			|||||||
 | 
					from calibre.web.feeds.news import BasicNewsRecipe
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					class DallasNews(BasicNewsRecipe):
 | 
				
			||||||
 | 
					    title          = u'The Dallas Morning News'
 | 
				
			||||||
 | 
					    language       = 'en'
 | 
				
			||||||
 | 
					    oldest_article = 2 #days
 | 
				
			||||||
 | 
					    max_articles_per_feed = 25
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    no_stylesheets = True
 | 
				
			||||||
 | 
					    remove_tags_before = dict(name='h2', attrs={'class':'vitstoryheadline'})
 | 
				
			||||||
 | 
					    remove_tags_after  = dict(name='div', attrs={'style':'width: 100%; clear: right'})
 | 
				
			||||||
 | 
					    remove_tags_after  = dict(name='div', attrs={'id':'article_tools_bottom'})
 | 
				
			||||||
 | 
					    remove_tags = [
 | 
				
			||||||
 | 
					       dict(name='iframe'),
 | 
				
			||||||
 | 
					       dict(name='div', attrs={'class':'biblockmore'}),
 | 
				
			||||||
 | 
					       dict(name='div', attrs={'style':'width: 100%; clear: right'}),
 | 
				
			||||||
 | 
					       dict(name='div', attrs={'id':'article_tools_bottom'}),
 | 
				
			||||||
 | 
					       #dict(name='ul', attrs={'class':'articleTools'}),
 | 
				
			||||||
 | 
					    ]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    feeds          = [
 | 
				
			||||||
 | 
					                      ('Latest News', 'http://www.dallasnews.com/newskiosk/rss/dallasnewslatestnews.xml'),
 | 
				
			||||||
 | 
					                      ('Local News', 'http://www.dallasnews.com/newskiosk/rss/dallasnewslocalnews.xml'),
 | 
				
			||||||
 | 
							      ('Nation and World', 'http://www.dallasnews.com/newskiosk/rss/dallasnewsnationworld.xml'),
 | 
				
			||||||
 | 
							      ('Politics', 'http://www.dallasnews.com/newskiosk/rss/dallasnewsnationalpolitics.xml'),
 | 
				
			||||||
 | 
							      ('Science', 'http://www.dallasnews.com/newskiosk/rss/dallasnewsscience.xml'),
 | 
				
			||||||
 | 
					                    ]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -111,6 +111,7 @@ class VMInstaller(Command):
 | 
				
			|||||||
            self.vm = self.VM
 | 
					            self.vm = self.VM
 | 
				
			||||||
        if not self.vmware_started():
 | 
					        if not self.vmware_started():
 | 
				
			||||||
            self.start_vmware()
 | 
					            self.start_vmware()
 | 
				
			||||||
 | 
					        subprocess.call(['chmod', '-R', '+r', 'resources/recipes'])
 | 
				
			||||||
        self.start_vm()
 | 
					        self.start_vm()
 | 
				
			||||||
        self.download_installer()
 | 
					        self.download_installer()
 | 
				
			||||||
        if not self.dont_shutdown:
 | 
					        if not self.dont_shutdown:
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user