remotes/1693045480750635534/spooky-22
Aevann1 2022-02-12 02:05:05 +02:00
parent ad7bc5dd03
commit 76bc01c2c0
2 changed files with 9 additions and 3 deletions

View File

@ -724,7 +724,10 @@ def thumbnail_thread(pid):
for t in ("submission","comment"):
word = random.choice(('rdrama','marsey'))
try: data = requests.get(f'https://api.pushshift.io/reddit/{t}/search?html_decode=true&q={word}&size=1').json()["data"]
try:
data = requests.get(f'https://api.pushshift.io/reddit/{t}/search?html_decode=true&q={word}&size=1')
if str(data) == "<Response [200]>": data = data.json()["data"]
else: break
except: break
for i in data:
@ -773,7 +776,10 @@ def thumbnail_thread(pid):
if SITE == 'pcmemes.net':
for t in ("submission","comment"):
try: data = requests.get(f'https://api.pushshift.io/reddit/{t}/search?html_decode=true&q=pcmemes.net&size=1').json()["data"]
try:
data = requests.get(f'https://api.pushshift.io/reddit/{t}/search?html_decode=true&q=pcmemes.net&size=1').json()["data"]
if str(data) == "<Response [200]>": data = data.json()["data"]
else: break
except: break
for i in data:

View File

@ -255,7 +255,7 @@
{% if p.award_count("tilt") %}
<style>
body {
transform: rotate({{(p.award_count("tilt"),4)|min}}deg);
transform: rotate({{(p.award_count("tilt")/4,1)|min}}deg);
}
</style>
{% endif %}