mirror of
				https://github.com/kovidgoyal/calibre.git
				synced 2025-11-04 03:27:00 -05:00 
			
		
		
		
	...
This commit is contained in:
		
							parent
							
								
									75a2996507
								
							
						
					
					
						commit
						6e697c4a83
					
				@ -16,11 +16,12 @@ class SportsIllustratedRecipe(BasicNewsRecipe) :
 | 
				
			|||||||
    remove_javascript = True
 | 
					    remove_javascript = True
 | 
				
			||||||
    use_embedded_content   = False
 | 
					    use_embedded_content   = False
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    INDEX = 'http://sportsillustrated.cnn.com/vault/cover/home/index.htm'
 | 
					    INDEX = 'http://sportsillustrated.cnn.com/'
 | 
				
			||||||
 | 
					    INDEX2 = 'http://sportsillustrated.cnn.com/vault/cover/home/index.htm'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def parse_index(self):
 | 
					    def parse_index(self):
 | 
				
			||||||
        answer = []
 | 
					        answer = []
 | 
				
			||||||
        soup = self.index_to_soup(self.INDEX)
 | 
					        soup = self.index_to_soup(self.INDEX2)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        #Loop through all of the "latest" covers until we find one that actually has articles
 | 
					        #Loop through all of the "latest" covers until we find one that actually has articles
 | 
				
			||||||
        for item in soup.findAll('div', attrs={'id': re.compile("ecomthumb_latest_*")}):
 | 
					        for item in soup.findAll('div', attrs={'id': re.compile("ecomthumb_latest_*")}):
 | 
				
			||||||
@ -52,8 +53,8 @@ class SportsIllustratedRecipe(BasicNewsRecipe) :
 | 
				
			|||||||
                description = self.tag_to_string(headline.findNextSibling('a').div)
 | 
					                description = self.tag_to_string(headline.findNextSibling('a').div)
 | 
				
			||||||
                article = {'title' : title, 'date' : u'', 'url'  : url, 'description' : description}
 | 
					                article = {'title' : title, 'date' : u'', 'url'  : url, 'description' : description}
 | 
				
			||||||
                articles.append(article)
 | 
					                articles.append(article)
 | 
				
			||||||
                if counter > 5:
 | 
					                #if counter > 5:
 | 
				
			||||||
                    break
 | 
					                    #break
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            # See if we can find a meaningfull title
 | 
					            # See if we can find a meaningfull title
 | 
				
			||||||
            feedTitle = 'Current Issue'
 | 
					            feedTitle = 'Current Issue'
 | 
				
			||||||
@ -70,8 +71,6 @@ class SportsIllustratedRecipe(BasicNewsRecipe) :
 | 
				
			|||||||
        # This is the url and the parameters that work to get the print version.
 | 
					        # This is the url and the parameters that work to get the print version.
 | 
				
			||||||
        printUrl = 'http://si.printthis.clickability.com/pt/printThis?clickMap=printThis'
 | 
					        printUrl = 'http://si.printthis.clickability.com/pt/printThis?clickMap=printThis'
 | 
				
			||||||
        printUrl += '&fb=Y&partnerID=2356&url=' + quote(url)
 | 
					        printUrl += '&fb=Y&partnerID=2356&url=' + quote(url)
 | 
				
			||||||
        self.log('PrintURL: ' , printUrl)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        return printUrl
 | 
					        return printUrl
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        # However the original javascript also uses the following parameters, but they can be left out:
 | 
					        # However the original javascript also uses the following parameters, but they can be left out:
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user