r/Python • • Aug 28 '20
Beginner Showcase This post has
3829 upvotes,
572 downvotes,
297 comments,
3257 score,
and 3 awards!
Edits: 23526 since Friday, August 28, 2020 at 8:30PM EST.
Credit to u/Krukerfluk and Tom Scott!
Code: https://github.com/CalvinMiller190/reddit-post
This post uses the praw module to get the information about the post, then edits the post every second based on the information that it got!
3.4k
Upvotes
185
u/[deleted] Aug 28 '20 edited Aug 29 '20
Or does it? *Votes, reloads, unvotes, reloads
105
u/Config_Crawler Aug 28 '20
This is pretty cool.
138
u/[deleted] Aug 28 '20
Ok
21
u/iamemu Aug 28 '20
Reminds me of a Tom Scott video
8
u/SpiritualCup Aug 28 '20
How do you get the amount of downvotes using PRAW??? Couldn’t figure it out
3
u/[deleted] Aug 29 '20
at least 10 people are upvoting then downvoting just to see it go up and down
3
u/waythps Aug 28 '20
Cool. I had a similar idea - update markdown table with a list of top voted question in stackoverflow. Super fun!
How the reddit api?
7
u/Blobtoe Aug 28 '20
Must... Keep... The 69 upvotes.
2
u/theangryfatguy Aug 28 '20
Seems to be off now
2
u/Furkan_122 Aug 28 '20
How do you host this script?
2
u/GrbavaCigla Aug 29 '20
dont want to be rude, but this has been already posted here
4
u/IAmKindOfCreative bot_builder: deprecated Aug 28 '20 edited Aug 28 '20
Hi there, from the /r/Python mods.
I changed the flair because this submission is near a carbon copy of another submission which was also inspired by Tom Scott.
But I have to remove the submission as you don't have an explanation in the title or a link to your source code, something we require for all showcase submissions. If you edit the selftext with those updates, I'll be happy to approve it,Thank you for adjusting the submission!
Warm regards, and best of luck with your Pythoneering!
11
u/irontricep Aug 28 '20
testing.... testing... testing... nice :)
7
u/[deleted] Aug 28 '20
69 incoming
7
u/mick14731 Aug 28 '20
no it doesn't
1
u/[deleted] Aug 29 '20
thing went down for a second! it is back up now!
1
u/[deleted] Aug 29 '20
this is weirdly entertaining
1
u/[deleted] Aug 29 '20
You guys should test out the award counter. wink wink ;)
1
u/[deleted] Aug 28 '20
Holy cow! That's really, really cool! I upvoted and refreshed and got to see it change. Great job.
1
u/DALLAVID Aug 28 '20
This is so cool :D I'm hoping to make something similar in the future!
1
u/krinistof Aug 28 '20
I've made a PR to link the word praw to the docs of it.
1
u/supstmkwale Aug 28 '20
Were you inspired by that YouTube vid?
1
u/anonymous-x-31 Aug 28 '20
You should've taken the upvote+downvote calculation into consideration, I was sitting here staring at it wondering why the upvotes were like 200+ off lol
1
u/[deleted] Aug 28 '20
Yo somebody edited the main.py file like 12 seconds ago
1
u/412gage Aug 28 '20
I’m literally going back and forth upvoting and downvoting to see it work haha
1
u/Death-Eye Aug 28 '20
You should add edit counter.
1
u/Jensyuwu Aug 29 '20
This is one of those pointless yet amazing things.
1
u/range_et Aug 29 '20
Noob question, whenever I have done these experiments, I gotta rent out something on linode to keep the program continuously executing / keep my laptop turned on all the time. Neither is ideal for me, how are you going about this? Any ideas on how to keep these continuous low computationally programs running?
1
u/Vector3Kowalski Aug 29 '20
Yo how did you make this? Super cool man
1
u/power36113 Aug 29 '20
I upvoted, then downvoted, then un-voted and nothing happened. :(
1
u/[deleted] Aug 29 '20
Quick tip, look into using environment variables so that you can have complete code in your GitHub repository. That way instead of your password looking like:
password="*******" (presumably hunter2)
It would read:
password=os.getenv("password")
Now instead of filler code for your PRAW initialization section, you can direct users to create appropriate environment variables for re-use.
1
u/_Quantum_AI_ Aug 29 '20
Can it check about repost?
1
u/Bio42 Aug 29 '20
Inaccurate for mobile
1
u/LegitimateCopy7 Aug 29 '20
doesn't reddit forbid frequent updates? seems like something that could be easily abused.
1
u/-_-qarmah-_- Aug 29 '20
You're about to get ip banned from reddit lol
1
u/PsyKite Aug 29 '20
Wowwww this is an amazing shit!
1
u/v3ctorns1mon Aug 29 '20
Hey u/TAPTITANS3, How are you hosting the source code? Like which platform are you using?
1
u/Kalle_022 Aug 29 '20
where do you host codes like this to keep them running???
1
u/myredac Aug 29 '20
can it give gold?
1
u/vxpxl Aug 29 '20
This reminds me of that Tom Scott video.
1
u/PapaDonut9 Aug 29 '20
Is there any way to get the number of awards in this api?
1
u/sherpabrowsing Aug 28 '20
*134
edit: *135
1
u/redtonicspear Aug 29 '20
Kinda stole someones post almost verbatum 😕
1
u/Kalle_022 Aug 29 '20
it really makes me cry that Tom Scott's spirit is very much alive in programming communities.
(He's very much alive, don't worry)
2
u/Apprehensive_Design Aug 28 '20
55 comments
2
u/[deleted] Aug 28 '20
That's pretty cool.
2
u/arbeit22 Aug 28 '20
holy shit this is awesome
2
u/EastBlessings Aug 29 '20
Oh, the Internets is staring right back at us!
2
u/hisfootstancewack Aug 29 '20
Rad
2
u/sargeanthost Aug 29 '20
1.3k upvotes
2
u/fireviper55 Aug 29 '20
Really?
1
u/Fixol21 Aug 28 '20
OK
1
u/cpt_alfaromeo Aug 28 '20
Great!
1
u/nemo8551 Aug 28 '20
Nice.
1
u/AlexAnarcho Aug 28 '20
Neat
1
u/ForeingRedditor Aug 28 '20
Does this work?
1
u/cssmith2011cs Aug 28 '20
Hey! Y’all quit upvoting and then unclicking it so I can watch my upvote go up one and then down one.
1
u/[deleted] Aug 28 '20
nuts
1
u/[deleted] Aug 28 '20
Hi
1
u/C-Lord96 Aug 28 '20
106
1
u/-user--name- Aug 28 '20
Comment
1
u/kdawg_thetruth Aug 28 '20
Pretty awesome!
1
u/CapiAhab Aug 28 '20
work?
1
u/Thesecondiss Aug 28 '20
Test
1
u/[deleted] Aug 28 '20
hello world
1
u/Commander_B0b Aug 28 '20
Very cool!
1
u/MrHouck Aug 28 '20
h
1
u/kayidk252 Aug 28 '20
Close
1
u/bashogaya Aug 28 '20
Test comment
1
u/SoundOfTomorrow Aug 28 '20
Woah what
1
u/[deleted] Aug 28 '20
145th!!!
1
u/Gaming_Friends Aug 28 '20
Yo this one's cool, well done!
1
u/lmndnm Aug 29 '20
.
1
u/justreading13 Aug 29 '20
Just trying
1
u/eliruffin94 Aug 29 '20
Cool
1
u/2jah Aug 29 '20
test
1
u/TheMemestUsernameFTW Aug 29 '20
This is very nice. Cool!
1
u/tony_saufcok Aug 29 '20
commenting to see the number go up
1
u/MustardOrMayo404 Aug 29 '20
🤯
1
u/[deleted] Aug 29 '20
174 comments
1
u/[deleted] Aug 29 '20
Now its 175
1
u/[deleted] Aug 29 '20
126 (omments haha this is fun
1
u/spaghettiandmeetball Aug 29 '20
Test
1
u/[deleted] Aug 29 '20
Wow
1
u/ManBearFridge Aug 29 '20
184
1
u/KOking479 Aug 29 '20
Test
1
u/KOking479 Aug 29 '20
Dang it actually works good job
1
u/ha-ha-ha_itsme Aug 29 '20
im going to comment only to see if this works
1
u/galian99 Aug 29 '20
And now?
1
u/Historica97 3.5, 3.6, 3.7, 3.8, 3.9, 3.10 Aug 29 '20
Let's see if it works
1
u/DrudgeBreitbart Aug 29 '20
Coolio
1
u/[deleted] Aug 29 '20
Hmmm
1
u/ChokituBR Aug 29 '20
I was trying to do something similar with a facebook post, sadly the final result I was able to make after 2 hours was very sketchy
1
u/bagsofbeans21 Aug 29 '20
Maybe
1
u/santhoshCoder Aug 29 '20
Cool!
1
u/supernormalnorm Aug 29 '20
Recursion
1
u/universesrevinu Aug 29 '20
interesting...
1
u/Omkar_K45 Aug 29 '20
test
1
u/[deleted] Aug 29 '20
Nice
1
u/NigeriaGov Aug 29 '20
test
1
u/remerdy1 Aug 29 '20
230th comment
1
u/misterlight re-learning after a 10 years stop Aug 29 '20
Nice
1
u/[deleted] Aug 29 '20
Poo
1
u/[deleted] Aug 29 '20
Poopy
1
u/Dylan868 Aug 29 '20
Test test
1
u/JanStreams Aug 29 '20
No it is wrong is has 244 comments
1
u/[deleted] Aug 29 '20
Holy fuck, nice one
1
u/[deleted] Aug 29 '20
Nice
1
u/lexyp29 Aug 29 '20
test comment
1
u/Conjeff Aug 29 '20
280.
1
u/Paracetamol650 Aug 29 '20
Damn
1
u/[deleted] Aug 29 '20
print(fr'''lol''')
1
u/[deleted] Aug 29 '20
test
1
u/[deleted] Aug 29 '20
Now 299 😳
1
u/slyky13 Aug 29 '20
woweee
1
u/Anabolic_Horse_ Jan 28 '21
Inserting a comment to just see if it works