raise FlickrError
infrontofme opened this issue · 2 comments
infrontofme commented
Hi, when I run following script:
python flickr_scraper.py --search 'honeybees on flowers' --n 10 --download
an error occurred.
Traceback (most recent call last):
File "flickr_scraper.py", line 68, in <module>
download=opt.download) # download images
File "flickr_scraper.py", line 33, in get_urls
for i, photo in enumerate(photos):
File "C:\Users\nanwa\anaconda3\lib\site-packages\flickrapi\core.py", line 688, in data_walker
rsp = method(page=page, **params)
File "C:\Users\nanwa\anaconda3\lib\site-packages\flickrapi\call_builder.py", line 38, in __call__
return self.flickrapi_object.do_flickr_call(self.method_name, **kwargs)
File "C:\Users\nanwa\anaconda3\lib\site-packages\flickrapi\core.py", line 337, in do_flickr_call
**params)
File "C:\Users\nanwa\anaconda3\lib\site-packages\flickrapi\core.py", line 407, in _wrap_in_parser
return parser(self, data)
File "C:\Users\nanwa\anaconda3\lib\site-packages\flickrapi\core.py", line 297, in parse_etree
raise FlickrError(six.u('Error: %(code)s: %(msg)s') % err.attrib, code=code)
flickrapi.exceptions.FlickrError: Error: 100: Invalid API Key (Key has invalid format)
I tried both on windows and ubuntu, reports the same error
:)
berkantay commented
did you embed your api and secret key to the flicker_scraper.py
glenn-jocher commented
@infrontofme @berkantay you need to use your own API key, as the README explains:
Use
-
Request a Flickr API key: https://www.flickr.com/services/apps/create/apply
-
Write your API key and secret in
flickr_scraper.py
L11-L12:
key = ''
secret = ''