diff --git a/modules/pastebin/pages.py b/modules/pastebin/pages.py index dfe38a33..91b7f1e9 100644 --- a/modules/pastebin/pages.py +++ b/modules/pastebin/pages.py @@ -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'): diff --git a/modules/pastebin/test.py b/modules/pastebin/test.py index 484d6969..e04000fb 100644 --- a/modules/pastebin/test.py +++ b/modules/pastebin/test.py @@ -56,6 +56,8 @@ class PastebinTest(BackendTest): p1 = self.backend.new_paste(None, title='ouiboube', contents=u'Weboob ¿¡', public=False) self.backend.post_paste(p1, max_age=600) assert p1.id + # not related to testing special chars, but check if the paste is + # really private since test_post() tests the contrary assert p1.public is False # this should use the raw method to get the contents