[wordreference] dirty fix for a dirty website
This commit is contained in:
parent
f20f59cdc7
commit
c56f8b2eb4
1 changed files with 5 additions and 1 deletions
|
|
@ -41,7 +41,11 @@ class TranslatePage(BasePage):
|
||||||
# if only one signification is found
|
# if only one signification is found
|
||||||
for div in self.document.getiterator('div'):
|
for div in self.document.getiterator('div'):
|
||||||
if div.attrib.get('class','') == "trans clickable":
|
if div.attrib.get('class','') == "trans clickable":
|
||||||
names = u''+" ".join(div.text_content().split(']')[1].split()[1:]).split(';')[0]
|
if ']' in div.text_content():
|
||||||
|
tnames = div.text_content().split(']')[1].split()[1:]
|
||||||
|
else:
|
||||||
|
tnames = div.text_content().split()[1:]
|
||||||
|
names = u''+" ".join(tnames).split(';')[0]
|
||||||
names = LAST_THING_IN_PARENTHESIS.sub("",names)
|
names = LAST_THING_IN_PARENTHESIS.sub("",names)
|
||||||
return names.strip()
|
return names.strip()
|
||||||
# another numerotation possibility...
|
# another numerotation possibility...
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue