Skip to content

Commit

Permalink
Merge pull request #345 from linuxdaemon/gonzobot+remove-snoo-paste
Browse files Browse the repository at this point in the history
Remove broken Snoonet paste
  • Loading branch information
linuxdaemon authored Jan 22, 2019
2 parents 667f503 + 9826b18 commit 2f561f2
Showing 1 changed file with 1 addition and 20 deletions.
21 changes: 1 addition & 20 deletions cloudbot/util/web.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,10 @@

# Constants
DEFAULT_SHORTENER = 'is.gd'
DEFAULT_PASTEBIN = 'snoonet'
DEFAULT_PASTEBIN = 'hastebin'

HASTEBIN_SERVER = 'https://hastebin.com'

SNOONET_PASTE = 'https://paste.snoonet.org'

logger = logging.getLogger('cloudbot')


Expand Down Expand Up @@ -252,20 +250,3 @@ def paste(self, data, ext):
return '{}/{}.{}'.format(HASTEBIN_SERVER, j['key'], ext)

raise ServiceError(j['message'], r)


@_pastebin('snoonet')
class SnoonetPaste(Pastebin):
def paste(self, data, ext):
params = {
'text': data,
'expire': '1d'
}
r = requests.post(SNOONET_PASTE + '/paste/new', data=params)
try:
r.raise_for_status()
except RequestException as e:
r = e.response
raise ServiceError(r.reason, r)
else:
return '{}'.format(r.url)

0 comments on commit 2f561f2

Please sign in to comment.