fds
This commit is contained in:
parent
01035bb87a
commit
f75db66b16
2 changed files with 9 additions and 3 deletions
|
@ -724,7 +724,10 @@ def thumbnail_thread(pid):
|
||||||
for t in ("submission","comment"):
|
for t in ("submission","comment"):
|
||||||
word = random.choice(('rdrama','marsey'))
|
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
|
except: break
|
||||||
|
|
||||||
for i in data:
|
for i in data:
|
||||||
|
@ -773,7 +776,10 @@ def thumbnail_thread(pid):
|
||||||
if SITE == 'pcmemes.net':
|
if SITE == 'pcmemes.net':
|
||||||
for t in ("submission","comment"):
|
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
|
except: break
|
||||||
|
|
||||||
for i in data:
|
for i in data:
|
||||||
|
|
|
@ -255,7 +255,7 @@
|
||||||
{% if p.award_count("tilt") %}
|
{% if p.award_count("tilt") %}
|
||||||
<style>
|
<style>
|
||||||
body {
|
body {
|
||||||
transform: rotate({{(p.award_count("tilt"),4)|min}}deg);
|
transform: rotate({{(p.award_count("tilt")/4,1)|min}}deg);
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue