forked from rDrama/rDrama
Merge branch 'frost' into champagne
commit
99dddb28f2
|
@ -1,2 +1,2 @@
|
||||||
github: Aevann1
|
github: Aevann1
|
||||||
custom: ["https://marsey1.gumroad.com/l/tfcvri"]
|
custom: ["https://marsey1.gumroad.com/l/tfcvri"]
|
|
@ -21,7 +21,7 @@ services:
|
||||||
- HCAPTCHA_SECRET=3435tdfsdudebussylmaoxxt43
|
- HCAPTCHA_SECRET=3435tdfsdudebussylmaoxxt43
|
||||||
- YOUTUBE_KEY=3435tdfsdudebussylmaoxxt43
|
- YOUTUBE_KEY=3435tdfsdudebussylmaoxxt43
|
||||||
- PUSHER_KEY=3435tdfsdudebussylmaoxxt43
|
- PUSHER_KEY=3435tdfsdudebussylmaoxxt43
|
||||||
- CATBOX_KEY=3435tdfsdudebussylmaoxxt43
|
- IMGUR_KEY=3435tdfsdudebussylmaoxxt43
|
||||||
- SPAM_SIMILARITY_THRESHOLD=0.5
|
- SPAM_SIMILARITY_THRESHOLD=0.5
|
||||||
- SPAM_SIMILAR_COUNT_THRESHOLD=5
|
- SPAM_SIMILAR_COUNT_THRESHOLD=5
|
||||||
- SPAM_URL_SIMILARITY_THRESHOLD=0.1
|
- SPAM_URL_SIMILARITY_THRESHOLD=0.1
|
||||||
|
@ -36,6 +36,7 @@ services:
|
||||||
- SLOGAN=Dude bussy lmao
|
- SLOGAN=Dude bussy lmao
|
||||||
- GUMROAD_TOKEN=3435tdfsdudebussylmaoxxt43
|
- GUMROAD_TOKEN=3435tdfsdudebussylmaoxxt43
|
||||||
- GUMROAD_LINK=https://marsey1.gumroad.com/l/tfcvri
|
- GUMROAD_LINK=https://marsey1.gumroad.com/l/tfcvri
|
||||||
|
- GUMROAD_ID=tfcvri
|
||||||
- CARD_VIEW=1
|
- CARD_VIEW=1
|
||||||
- DISABLE_DOWNVOTES=0
|
- DISABLE_DOWNVOTES=0
|
||||||
- DUES=0
|
- DUES=0
|
||||||
|
|
3
env
3
env
|
@ -10,7 +10,7 @@ export DISCORD_BOT_TOKEN="3435tdfsdudebussylmaoxxt43"
|
||||||
export HCAPTCHA_SECRET="3435tdfsdudebussylmaoxxt43"
|
export HCAPTCHA_SECRET="3435tdfsdudebussylmaoxxt43"
|
||||||
export YOUTUBE_KEY="3435tdfsdudebussylmaoxxt43"
|
export YOUTUBE_KEY="3435tdfsdudebussylmaoxxt43"
|
||||||
export PUSHER_KEY="3435tdfsdudebussylmaoxxt43"
|
export PUSHER_KEY="3435tdfsdudebussylmaoxxt43"
|
||||||
export CATBOX_KEY="3435tdfsdudebussylmaoxxt43"
|
export IMGUR_KEY="3435tdfsdudebussylmaoxxt43"
|
||||||
export SPAM_SIMILARITY_THRESHOLD="0.5"
|
export SPAM_SIMILARITY_THRESHOLD="0.5"
|
||||||
export SPAM_SIMILAR_COUNT_THRESHOLD="5"
|
export SPAM_SIMILAR_COUNT_THRESHOLD="5"
|
||||||
export SPAM_URL_SIMILARITY_THRESHOLD="0.1"
|
export SPAM_URL_SIMILARITY_THRESHOLD="0.1"
|
||||||
|
@ -23,6 +23,7 @@ export DEFAULT_TIME_FILTER="all"
|
||||||
export SLOGAN="Dude bussy lmao"
|
export SLOGAN="Dude bussy lmao"
|
||||||
export GUMROAD_TOKEN="3435tdfsdudebussylmaoxxt43"
|
export GUMROAD_TOKEN="3435tdfsdudebussylmaoxxt43"
|
||||||
export GUMROAD_LINK="https://marsey1.gumroad.com/l/tfcvri"
|
export GUMROAD_LINK="https://marsey1.gumroad.com/l/tfcvri"
|
||||||
|
export GUMROAD_ID="tfcvri"
|
||||||
export CARD_VIEW="1"
|
export CARD_VIEW="1"
|
||||||
export DISABLE_DOWNVOTES="0"
|
export DISABLE_DOWNVOTES="0"
|
||||||
export DUES="0"
|
export DUES="0"
|
||||||
|
|
|
@ -19,6 +19,8 @@ from files.helpers.discord import add_role
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
|
|
||||||
SITE_NAME = environ.get("SITE_NAME", "").strip()
|
SITE_NAME = environ.get("SITE_NAME", "").strip()
|
||||||
|
GUMROAD_ID = environ.get("GUMROAD_ID", "tfcvri").strip()
|
||||||
|
|
||||||
if SITE_NAME == 'PCM': cc = "splash mountain"
|
if SITE_NAME == 'PCM': cc = "splash mountain"
|
||||||
else: cc = "country club"
|
else: cc = "country club"
|
||||||
month = datetime.now().strftime('%B')
|
month = datetime.now().strftime('%B')
|
||||||
|
@ -201,7 +203,7 @@ def monthly(v):
|
||||||
|
|
||||||
data = {'access_token': GUMROAD_TOKEN}
|
data = {'access_token': GUMROAD_TOKEN}
|
||||||
|
|
||||||
response = [x['email'] for x in requests.get('https://api.gumroad.com/v2/products/tfcvri/subscribers', data=data, timeout=5).json()["subscribers"]]
|
response = [x['email'] for x in requests.get(f'https://api.gumroad.com/v2/products/{GUMROAD_ID}/subscribers', data=data, timeout=5).json()["subscribers"]]
|
||||||
emails = []
|
emails = []
|
||||||
|
|
||||||
for email in response:
|
for email in response:
|
||||||
|
|
|
@ -14,7 +14,7 @@ import requests
|
||||||
site = environ.get("DOMAIN").strip()
|
site = environ.get("DOMAIN").strip()
|
||||||
if site == 'pcmemes.net': cc = "SPLASH MOUNTAIN"
|
if site == 'pcmemes.net': cc = "SPLASH MOUNTAIN"
|
||||||
else: cc = "COUNTRY CLUB"
|
else: cc = "COUNTRY CLUB"
|
||||||
CATBOX_KEY = environ.get("CATBOX_KEY").strip()
|
IMGUR_KEY = environ.get("IMGUR_KEY").strip()
|
||||||
|
|
||||||
beams_client = PushNotifications(
|
beams_client = PushNotifications(
|
||||||
instance_id=PUSHER_INSTANCE_ID,
|
instance_id=PUSHER_INSTANCE_ID,
|
||||||
|
@ -202,7 +202,7 @@ def api_comment(v):
|
||||||
elif file.content_type.startswith('video/'):
|
elif file.content_type.startswith('video/'):
|
||||||
file.save("video.mp4")
|
file.save("video.mp4")
|
||||||
with open("video.mp4", 'rb') as f:
|
with open("video.mp4", 'rb') as f:
|
||||||
url = requests.request("POST", "https://api.imgur.com/3/upload", headers={'Authorization': f'Client-ID {CATBOX_KEY}'}, files=[('video', f)]).json()['data']['link']
|
url = requests.request("POST", "https://api.imgur.com/3/upload", headers={'Authorization': f'Client-ID {IMGUR_KEY}'}, files=[('video', f)]).json()['data']['link']
|
||||||
body += f"\n\n{url}"
|
body += f"\n\n{url}"
|
||||||
else: return {"error": f"Image/Video files only"}, 400
|
else: return {"error": f"Image/Video files only"}, 400
|
||||||
|
|
||||||
|
@ -716,7 +716,7 @@ def edit_comment(cid, v):
|
||||||
elif file.content_type.startswith('video/'):
|
elif file.content_type.startswith('video/'):
|
||||||
file.save("video.mp4")
|
file.save("video.mp4")
|
||||||
with open("video.mp4", 'rb') as f:
|
with open("video.mp4", 'rb') as f:
|
||||||
url = requests.request("POST", "https://api.imgur.com/3/upload", headers={'Authorization': f'Client-ID {CATBOX_KEY}'}, files=[('video', f)]).json()['data']['link']
|
url = requests.request("POST", "https://api.imgur.com/3/upload", headers={'Authorization': f'Client-ID {IMGUR_KEY}'}, files=[('video', f)]).json()['data']['link']
|
||||||
body += f"\n\n{url}"
|
body += f"\n\n{url}"
|
||||||
else: return {"error": f"Image/Video files only"}, 400
|
else: return {"error": f"Image/Video files only"}, 400
|
||||||
|
|
||||||
|
|
|
@ -22,7 +22,7 @@ from shutil import copyfile
|
||||||
|
|
||||||
site = environ.get("DOMAIN").strip()
|
site = environ.get("DOMAIN").strip()
|
||||||
site_name = environ.get("SITE_NAME").strip()
|
site_name = environ.get("SITE_NAME").strip()
|
||||||
CATBOX_KEY = environ.get("CATBOX_KEY").strip()
|
IMGUR_KEY = environ.get("IMGUR_KEY").strip()
|
||||||
titleheaders = {"User-Agent": f"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.72 Safari/537.36"}
|
titleheaders = {"User-Agent": f"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.72 Safari/537.36"}
|
||||||
|
|
||||||
if path.exists(f'snappy_{site_name}.txt'):
|
if path.exists(f'snappy_{site_name}.txt'):
|
||||||
|
@ -449,7 +449,7 @@ def edit_post(pid, v):
|
||||||
elif file.content_type.startswith('video/'):
|
elif file.content_type.startswith('video/'):
|
||||||
file.save("video.mp4")
|
file.save("video.mp4")
|
||||||
with open("video.mp4", 'rb') as f:
|
with open("video.mp4", 'rb') as f:
|
||||||
url = requests.request("POST", "https://api.imgur.com/3/upload", headers={'Authorization': f'Client-ID {CATBOX_KEY}'}, files=[('video', f)]).json()['data']['link']
|
url = requests.request("POST", "https://api.imgur.com/3/upload", headers={'Authorization': f'Client-ID {IMGUR_KEY}'}, files=[('video', f)]).json()['data']['link']
|
||||||
body += f"\n\n{url}"
|
body += f"\n\n{url}"
|
||||||
else: return {"error": f"Image/Video files only"}, 400
|
else: return {"error": f"Image/Video files only"}, 400
|
||||||
|
|
||||||
|
@ -941,7 +941,7 @@ def submit_post(v):
|
||||||
elif file.content_type.startswith('video/'):
|
elif file.content_type.startswith('video/'):
|
||||||
file.save("video.mp4")
|
file.save("video.mp4")
|
||||||
with open("video.mp4", 'rb') as f:
|
with open("video.mp4", 'rb') as f:
|
||||||
url = requests.request("POST", "https://api.imgur.com/3/upload", headers={'Authorization': f'Client-ID {CATBOX_KEY}'}, files=[('video', f)]).json()['data']['link']
|
url = requests.request("POST", "https://api.imgur.com/3/upload", headers={'Authorization': f'Client-ID {IMGUR_KEY}'}, files=[('video', f)]).json()['data']['link']
|
||||||
body += f"\n\n{url}"
|
body += f"\n\n{url}"
|
||||||
else:
|
else:
|
||||||
if request.headers.get("Authorization"): return {"error": f"Image/Video files only"}, 400
|
if request.headers.get("Authorization"): return {"error": f"Image/Video files only"}, 400
|
||||||
|
@ -1043,7 +1043,7 @@ def submit_post(v):
|
||||||
elif file.content_type.startswith('video/'):
|
elif file.content_type.startswith('video/'):
|
||||||
file.save("video.mp4")
|
file.save("video.mp4")
|
||||||
with open("video.mp4", 'rb') as f:
|
with open("video.mp4", 'rb') as f:
|
||||||
url = requests.request("POST", "https://api.imgur.com/3/upload", headers={'Authorization': f'Client-ID {CATBOX_KEY}'}, files=[('video', f)]).json()['data']['link']
|
url = requests.request("POST", "https://api.imgur.com/3/upload", headers={'Authorization': f'Client-ID {IMGUR_KEY}'}, files=[('video', f)]).json()['data']['link']
|
||||||
new_post.url = url
|
new_post.url = url
|
||||||
|
|
||||||
if not new_post.thumburl and new_post.url and request.headers.get('cf-ipcountry')!="T1": gevent.spawn( thumbnail_thread, new_post.id)
|
if not new_post.thumburl and new_post.url and request.headers.get('cf-ipcountry')!="T1": gevent.spawn( thumbnail_thread, new_post.id)
|
||||||
|
|
|
@ -22,7 +22,8 @@ YOUTUBE_KEY = environ.get("YOUTUBE_KEY", "").strip()
|
||||||
COINS_NAME = environ.get("COINS_NAME").strip()
|
COINS_NAME = environ.get("COINS_NAME").strip()
|
||||||
GUMROAD_TOKEN = environ.get("GUMROAD_TOKEN", "").strip()
|
GUMROAD_TOKEN = environ.get("GUMROAD_TOKEN", "").strip()
|
||||||
SITE_NAME = environ.get("SITE_NAME", "").strip()
|
SITE_NAME = environ.get("SITE_NAME", "").strip()
|
||||||
CATBOX_KEY = environ.get("CATBOX_KEY").strip()
|
IMGUR_KEY = environ.get("IMGUR_KEY").strip()
|
||||||
|
GUMROAD_ID = environ.get("GUMROAD_ID", "tfcvri").strip()
|
||||||
|
|
||||||
tiers={
|
tiers={
|
||||||
"(Paypig)": 1,
|
"(Paypig)": 1,
|
||||||
|
@ -302,7 +303,7 @@ def settings_profile_post(v):
|
||||||
elif file.content_type.startswith('video/'):
|
elif file.content_type.startswith('video/'):
|
||||||
file.save("video.mp4")
|
file.save("video.mp4")
|
||||||
with open("video.mp4", 'rb') as f:
|
with open("video.mp4", 'rb') as f:
|
||||||
url = requests.request("POST", "https://api.imgur.com/3/upload", headers={'Authorization': f'Client-ID {CATBOX_KEY}'}, files=[('video', f)]).json()['data']['link']
|
url = requests.request("POST", "https://api.imgur.com/3/upload", headers={'Authorization': f'Client-ID {IMGUR_KEY}'}, files=[('video', f)]).json()['data']['link']
|
||||||
bio += f"\n\n{url}"
|
bio += f"\n\n{url}"
|
||||||
else:
|
else:
|
||||||
if request.headers.get("Authorization"): return {"error": f"Image/Video files only"}, 400
|
if request.headers.get("Authorization"): return {"error": f"Image/Video files only"}, 400
|
||||||
|
@ -501,7 +502,7 @@ def gumroad(v):
|
||||||
|
|
||||||
data = {'access_token': GUMROAD_TOKEN,}
|
data = {'access_token': GUMROAD_TOKEN,}
|
||||||
|
|
||||||
response = [x['email'] for x in requests.get('https://api.gumroad.com/v2/products/tfcvri/subscribers', data=data, timeout=5).json()["subscribers"]]
|
response = [x['email'] for x in requests.get(f'https://api.gumroad.com/v2/products/{GUMROAD_ID}/subscribers', data=data, timeout=5).json()["subscribers"]]
|
||||||
emails = []
|
emails = []
|
||||||
|
|
||||||
for email in response:
|
for email in response:
|
||||||
|
|
Loading…
Reference in New Issue