-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
Hi,
Last bug i guess : for words like "lundi" and "pauvrement" the module is crashing with
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
d:\workspaces\WiktionnaireParser\tmp.py in <module>
3 page = wiktp.from_source("pauvrement")
----> 4 page = page.get_word_data["partOfSpeech"]
5 page
d:\workspaces\WiktionnaireParser\wiktionnaireparser\parser.py in get_word_data(self)
75 'title': self.get_title(),
76 'etymologies': self.get_etymology(),
---> 77 'partOfSpeech': self.get_parts_of_speech(),
78 }
79
d:\workspaces\WiktionnaireParser\wiktionnaireparser\parser.py in get_parts_of_speech(self)
150 if not re.match(r'#Traductions', value):
151 continue
--> 152 translation = self.get_translations(value)
153 parts_of_speech[nice_section_name]['translations'] = translation
154
d:\workspaces\WiktionnaireParser\wiktionnaireparser\parser.py in get_translations(self, translation_id)
275
276 for line in lines:
--> 277 language = line.find('span').text_content()
278 transl = []
279 links = line.find('a')
AttributeError: 'NoneType' object has no attribute 'text_content'
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels