Fix bad encoding error with a hack
This commit is contained in:
parent
9d65fbf7af
commit
b583e0aa53
1 changed files with 7 additions and 1 deletions
|
|
@ -49,7 +49,13 @@ class TransferConfirm(BasePage):
|
|||
class TransferSummary(BasePage):
|
||||
def get_transfer_id(self):
|
||||
p = self.document.xpath("//form/div/p")[0]
|
||||
text = to_unicode(p.text).strip()
|
||||
|
||||
#HACK for deal with bad encoding ...
|
||||
try:
|
||||
text = p.text
|
||||
except UnicodeDecodeError, error:
|
||||
text = error.object.strip()
|
||||
|
||||
|
||||
match = re.search("Votre virement N.+ ([0-9]+) ", text)
|
||||
if match:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue