Created
July 9, 2020 06:16
-
-
Save HarshCasper/6c5d16cd5b7b7e793c7639c8ac691041 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@app.route('/givetext/<sub>') | |
def text_meme(sub): #showerthoughts or quotes | |
r = get_text(sub,100) | |
requsted = random.choice(r) | |
return jsonify({ | |
'Title': requsted["Title"], | |
'Selftext': requsted["text"], | |
'Upvotes': requsted["Upvotes"], | |
'Downvotes': requsted["Downvotes"], | |
'Redditurl': requsted["Redditurl"], | |
'Subreddit': requsted["Subreddit"] | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment