ultralytics / flickr_scraper

Simple Flickr Image Scraper
https://ultralytics.com
GNU Affero General Public License v3.0
207 stars 62 forks source link

ERROR: "unrecognized arguments" when the search term has multiple words #2

Closed luisfelipesdn12 closed 4 years ago

luisfelipesdn12 commented 4 years ago

Hey! First of all: congrats for the api. Well, every time I try to search something with more than one word, like 'Albert Eistein' I'm having the issue below:

\flickr_scraper-master>python flickr_scraper.py --search 'flat design' --n 10 --download
usage: flickr_scraper.py [-h] [--search SEARCH] [--n N] [--download]
flickr_scraper.py: error: unrecognized arguments: design'

It doesn't happen when the search term is like 'Beatles'.

glenn-jocher commented 4 years ago

@luisfelipesdn12 hmm, that's odd. Have you tried double quotes? --search "flat design"?

glenn-jocher commented 4 years ago

I just tried your search now without any problems. Maybe it's an environment issue, I'm on MacOS, but I'm guessing this should work on unix also. You could try to run it in a Google Colab notebook?

(env0) glennjocher@Glenns-MBP flickr_scraper % python3 flickr_scraper.py --search 'flat design' --n 10 --download
0/10 https://live.staticflickr.com/561/32504316946_7f148f7e50_o.jpg
1/10 https://live.staticflickr.com/5531/10588364805_7ab7351767_o.jpg
2/10 https://live.staticflickr.com/2858/9074202789_89f368a9e1_o.png
3/10 https://farm2.staticflickr.com/1454/25971296136_81fdfd170a_b.jpg
4/10 https://live.staticflickr.com/3739/10588986074_6164f720d9_o.jpg
5/10 https://live.staticflickr.com/65535/48650060017_dd417bc807_o.jpg
6/10 https://live.staticflickr.com/5516/10589144656_f64e701147_o.jpg
7/10 https://live.staticflickr.com/4560/27166950089_7692aa698a_o.jpg
8/10 https://farm66.staticflickr.com/65535/48026606378_de844cf2ca_b.jpg
9/10 https://live.staticflickr.com/5515/10588983234_99f9a4462b_o.jpg
Done.
All images saved to /Users/glennjocher/PycharmProjects/flickr_scraper/images/flat_design/
luisfelipesdn12 commented 4 years ago

Oh! It worked here too! Thanks :)

glenn-jocher commented 4 years ago

Great! So I’m confused, was the problem the single quotes or something else?

luisfelipesdn12 commented 4 years ago

Oh, I'm sorry. The problem was solved completely! I've reopened accidentally. Thanks :)

glenn-jocher commented 8 months ago

@luisfelipesdn12 no worries at all! I'm glad the issue got resolved. If you have any more questions or run into any other issues, feel free to ask.