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:
parent
0cf736f10d
commit
ce6d9bdcd7
2 changed files with 3 additions and 1 deletions
|
|
@ -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'):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue