mirror of
https://github.com/placeAtlas/atlas.git
synced 2024-12-25 18:54:17 +01:00
add docstring to redditcrawl.py
This commit is contained in:
parent
c197c2ccd2
commit
c1a832389e
1 changed files with 20 additions and 0 deletions
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue