1. Ashley Felton
  2. slideshow-pi

Commits

Ashley Felton  committed 854c532

Docstrings.

  • Participants
  • Parent commits 9c3383d
  • Branches default

Comments (0)

Files changed (1)

File image_scraper.py

View file
 
 
 def reddit_sfwporn_urls():
+    '''
+    Returns a list of Imgur URLs to image files posted to the Reddit SFWPorn network.
+    Won't guarantee that all URLs are valid, but most should be.
+    '''
     imgur = []
     r = requests.get(REDDIT_SFWPORN_URL)
     j = json.loads(r.content)
 
 
 def scrape_images(urls=None):
+    '''
+    Tries to download all the images from a passed-in list of URLs into the local directory.
+    Skips any images that exist locally, and pauses 10s between downloads.
+    '''
     if not urls:
         urls = reddit_sfwporn_urls()
     for url in urls: