IEPUG / image_project

Group learning project
4 stars 6 forks source link

global imageList var #6

Open JennaSys opened 9 years ago

JennaSys commented 9 years ago

In image_scrape.py, the global imageList var should probably be internalized into the ImageScraper object.

cgoodale commented 9 years ago

Hey @JennaSys are you thinking it would be a simple attribute on the ImageScrapper object? If so then we could use the list variable convention of pluralizing the name and dropping the "List" suffix, hence an attribute called 'images'. After digging into the code a little more i realize that this list doesn't hold images, but instead holds the image_urls, so I'd use that variable name.

Hence to access the image_urls one would merely run:

scraper = ImageScrapper()
"""
Run some image scraping methods here

"""
scraper.image_urls  # This would return a list of image_urls that have been scraped.
JennaSys commented 9 years ago

Yea that's basically what I was thinking. I originally used it just as a sanity check after the scraping finished to get a final image count and for debugging purposes in case I needed to manually check URLs. -John

cgoodale commented 9 years ago

It looks like Josh opted to use the FlickrAPI after all to fetch the images for the Flask App. I am going to merge his latest code changes to I can exercise his Flask API and make sure I can do something interesting with the map in the browser.

Once everything get's working we might consider going back over the code and looking for areas to clean-up and possibly refactor.