Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #just dont use the auto-format its not working rn
- import praw
- import webbrowser
- def get(text):
- last = ""
- ongoing = []
- this = input(text)
- while 1:
- if this == last and this == "":
- break
- ongoing.append(this)
- last = this
- this = input('')
- ongoing = ongoing.pop() #workaround i dont care
- return "\n".join(ongoing)
- def image():
- hastext = input("Text? [yn] ").lower() == "y"
- description = get("Description: ")
- if hastext:
- text = get("Text: ")
- return """*Image Transcription:*
- ---
- *[%s]*
- %s
- ---
- ^^I'm a human volunteer content transcriber for Reddit! [If  you'd like more information on what we do and why we do it, click here!](https://www.reddit.com/r/TranscribersOfReddit/wiki/index)""" % (description, text)
- else:
- return """*Image Transcription:*
- ---
- *%s*
- ---
- ^^I'm a human volunteer content transcriber for Reddit! [If  you'd like more information on what we do and why we do it, click here!](https://www.reddit.com/r/TranscribersOfReddit/wiki/index)""" % description
- r = praw.Reddit(client_id='e-ZdWMo3zWMqxA', client_secret="T0YrVREJw0CSHpRH5bbiCvEijlY", password="1234me", user_agent='ToR Scraper 0.2.0', username="e-dt")
- tor = r.subreddit('TranscribersOfReddit')
- already_seen = []
- for submission in tor.new(limit=100):
- if submission in already_seen:
- continue
- already_seen.append(submission) #append even if Completed etc
- if not submission.link_flair_text == "Unclaimed":
- continue
- webbrowser.get("chrome").open_new_tab(submission.url)
- webbrowser.get("chrome").open_new_tab("https://reddit.com" + submission.permalink)
- posttype = input("Post type? ").lower()
- if posttype != "":
- submission.reply("claim")
- if posttype == "4chan":
- ... #implement 4chan later
- elif posttype == "image":
- print(image())
- elif posttype == "reddit":
- ... #comment threading is complicated put off til later
- elif posttype == "facebook":
- ... #comment threading (thankfully only 1-level deep)
- elif posttype == "twitter":
- ... #replies are 1d thankfully
- elif posttype == "sms":
- ...
- elif posttype == "comic":
- ... #do later aaah
- elif posttype == "audio":
- ... #should actually be easy enough
- elif posttype == "video":
- ... #aaah nope
- else:
- print("Skipping...")
Add Comment
Please, Sign In to add comment