12345678910111213141516171819202122232425262728 |
- import os
-
- import http.cookiejar as cookielib
-
- def load_cookiejar():
- cpath = os.getenv('SB_COOKIES_TXT')
- print('using cookies', cpath)
- cj = cookielib.MozillaCookieJar(cpath)
- cj.load()
- return cj
-
- def get_google_abuse_token():
- ga = os.getenv('SB_GOOGABUSE')
- if ga is not None:
- ga = ga.strip()
- return ga
-
- def get_report_webhook():
- hu = os.getenv('SB_REPORT_WH')
- if hu is not None:
- hu = hu.strip()
- return hu
-
- def get_admin_key():
- ak = os.getenv('SB_ADMIN_KEY')
- if ak is not None:
- ak = ak.strip()
- return ak
|