Skip to content

Commit

Permalink
adaptive pasting default service
Browse files Browse the repository at this point in the history
  • Loading branch information
rking32 authored Sep 3, 2021
1 parent 4210b22 commit b4c5e36
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion userge/plugins/utils/paste.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,11 @@ async def paste(self, ses: aiohttp.ClientSession,

_SERVICES: Dict[str, PasteService] = {
'-n': NekoBin(), '-h': HasteBin(), '-r': Rentry(), '-p': Pasting(), '-pl': PastyLus()}
_DEFAULT_SERVICE = '-n'

if Config.HEROKU_ENV:
_DEFAULT_SERVICE = '-pl'
else:
_DEFAULT_SERVICE = '-n'

_HEADERS = {'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_5) AppleWebKit/537.36 ('
'KHTML, like Gecko) Cafari/537.36'}
Expand Down

0 comments on commit b4c5e36

Please sign in to comment.