Parfois le alt manque
This commit is contained in:
		@@ -54,7 +54,10 @@ class CExtractor(TwoStepsExtractorNoPause):
 | 
			
		||||
                soup = BeautifulSoup(html, "html.parser")
 | 
			
		||||
                title = soup.select_one("h2.widgit_title").text.strip()
 | 
			
		||||
                image = soup.select_one("img")
 | 
			
		||||
                image_alt = image["alt"]
 | 
			
		||||
                if image.has_attr("alt"):
 | 
			
		||||
                    image_alt = image["alt"]
 | 
			
		||||
                else:
 | 
			
		||||
                    image_alt = ""
 | 
			
		||||
                image = image["src"]
 | 
			
		||||
                description = soup.select("div.desc")
 | 
			
		||||
                description = "\n".join([d.text for d in description])
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user