@@ -265,7 +265,7 @@ def logos(self):
265265 soup = BeautifulSoup (self .html , "html.parser" )
266266 info = soup .find ("table" , {"class" : "infobox" })
267267 if info is not None :
268- children = info .findAll ( " " , { "class" : " image"} )
268+ children = info .find_all ( "a " , class_ = " image" )
269269 for child in children :
270270 self ._logos .append ("https:" + child .img ["src" ])
271271 return self ._logos
@@ -283,7 +283,7 @@ def hatnotes(self):
283283 if self ._hatnotes is None :
284284 self ._hatnotes = list ()
285285 soup = BeautifulSoup (self .html , "html.parser" )
286- notes = soup .findAll ( " " , { "class" : " hatnote"} )
286+ notes = soup .find_all ( "div " , class_ = " hatnote" )
287287 if notes is not None :
288288 for note in notes :
289289 tmp = list ()
@@ -513,7 +513,7 @@ def parse_section_links(self, section_title):
513513 Note:
514514 This is a parsing operation and not part of the standard API"""
515515 soup = BeautifulSoup (self .html , "html.parser" )
516- headlines = soup .find_all ("span" , { "class" : " mw-headline"} )
516+ headlines = soup .find_all ("span" , class_ = " mw-headline" )
517517 tmp_soup = BeautifulSoup (section_title , "html.parser" )
518518 tmp_sec_title = tmp_soup .get_text ().lower ()
519519 id_tag = None
@@ -686,7 +686,7 @@ def _parse_section_links(self, id_tag):
686686 if node .name == "a" :
687687 all_links .append (self .__parse_link_info (node ))
688688 else :
689- for link in node .findAll ("a" ):
689+ for link in node .find_all ("a" ):
690690 all_links .append (self .__parse_link_info (link ))
691691 return all_links
692692
0 commit comments