Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

global imageList var #6

Open
JennaSys opened this issue Mar 23, 2015 · 3 comments
Open

global imageList var #6

JennaSys opened this issue Mar 23, 2015 · 3 comments

Comments

@JennaSys
Copy link
Contributor

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

@cgoodale
Copy link
Contributor

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
Copy link
Contributor Author

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
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants