add docstring to redditcrawl.py

This commit is contained in:
ash 2022-04-04 19:02:15 +01:00
parent c197c2ccd2
commit c1a832389e
No known key found for this signature in database
GPG key ID: 9680D0BE1469C427

View file

@ -17,6 +17,26 @@
latestID = int(input("Latest ID: ")) latestID = int(input("Latest ID: "))
for submission in reddit.subreddit('placeAtlas2').new(limit=220): for submission in reddit.subreddit('placeAtlas2').new(limit=220):
"""
Auth setup
1. Head to https://www.reddit.com/prefs/apps
2. Click "create another app"
3. Give it a name and description
4. Select "script"
5. Redirect to http://localhost:8080
6. Copy ID (under Personal Use Script)
7. Append to file called "credentials"
8. Copy Secret
9. Append on newline to "credentials" file
10. Run Script
Running Script
1. Input the next ID to use
2. Manually resolve errors in manual_atlas.json
3. Copy temp_atlas.json entries into web/_js/atlas.js
4. Pull Request
"""
#print(dir(submission)) #print(dir(submission))
if(submission.link_flair_text == "New Entry"): if(submission.link_flair_text == "New Entry"):
text = submission.selftext text = submission.selftext