Fix getting pastebin paste visiblity

Pastebin somehow decided to use title instead of alt.
They are wrong. That attribute should at least tell "Private" or "Public" to
blind users. Well, another reason to use Weboob instead of their website!
This commit is contained in:
Laurent Bachelier 2012-03-06 20:22:26 +01:00
commit ce6d9bdcd7
2 changed files with 3 additions and 1 deletions

View file

@ -51,7 +51,7 @@ class PastePage(LoginPage):
paste.contents = self.parser.select(self.document.getroot(),
'//textarea[@id="paste_code"]', 1, 'xpath').text
visibility_text = self.parser.select(header,
'//div[@class="paste_box_line1"]//img', 1, 'xpath').attrib['alt']
'//div[@class="paste_box_line1"]//img', 1, 'xpath').attrib['title']
if visibility_text.startswith('Public'):
paste.public = True
elif visibility_text.startswith('Private'):