CapPaste: Support expiration for posting, as a max_age parameter
This commit is contained in:
parent
a9220c96af
commit
f63180c187
10 changed files with 71 additions and 27 deletions
|
|
@ -66,9 +66,9 @@ class PastealaconBrowser(BaseBrowser):
|
|||
except BrowserHTTPNotFound:
|
||||
raise PasteNotFound()
|
||||
|
||||
def post_paste(self, paste):
|
||||
def post_paste(self, paste, expiration=None):
|
||||
self.home()
|
||||
self.page.post(paste)
|
||||
self.page.post(paste, expiration=expiration)
|
||||
if self.is_on_page(CaptchaPage):
|
||||
raise BrowserUnavailable("Detected as spam and unable to handle the captcha")
|
||||
paste.id = self.page.get_id()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue