Initial commit, refactored some things from original code and removed WP functionality
This commit is contained in:
18
bot/constants.py
Normal file
18
bot/constants.py
Normal file
@@ -0,0 +1,18 @@
|
||||
import os
|
||||
|
||||
TELEGRAM_API_KEY = os.getenv('TELEGRAM_API_KEY')
|
||||
baseURL = os.environ['baseURL']
|
||||
affiliate_tag = os.environ['affiliate_tag']
|
||||
HEADERS = ({'User-Agent':
|
||||
'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/44.0.2403.157 Safari/537.36',
|
||||
'Accept-Language': 'en-US, en;q=0.5'})
|
||||
DB = '/data/amazon.db'
|
||||
|
||||
if baseURL.startswith("https://www."):
|
||||
searchURL = baseURL[12:]
|
||||
elif baseURL.startswith("http://www."):
|
||||
searchURL = baseURL[11:]
|
||||
baseURL = "https://www."+searchURL
|
||||
else:
|
||||
searchURL = baseURL
|
||||
baseURL = "https://www."+baseURL
|
||||
Reference in New Issue
Block a user