1995parham / gosimac

Fetch the wallpaper from Bing, Unsplash, etc.
GNU General Public License v2.0
29 stars 3 forks source link

ERROR unsplash engine failed: enigne failed: source initiation failed: request failed #11

Closed Xiechengqi closed 2 years ago

Xiechengqi commented 2 years ago
 ██████   ██████  ███████ ██ ███    ███  █████   ██████
██       ██    ██ ██      ██ ████  ████ ██   ██ ██
██   ███ ██    ██ ███████ ██ ██ ████ ██ ███████ ██
██    ██ ██    ██      ██ ██ ██  ██  ██ ██   ██ ██
 ██████   ██████  ███████ ██ ██      ██ ██   ██  ██████

 Description  gosimac
 Description  Source: &{response:[] N:20 Query: Orientation:landscape}
 Description  Path: /mnt/market/unsplash
Error: unsplash engine failed: enigne failed: source initiation failed: request failed
Usage:
  GoSiMac unsplash [flags]

Aliases:
  unsplash, u

Flags:
  -h, --help                 help for unsplash
  -o, --orientation string   Filter search results by photo orientation, Valid values are landscape, portrait, and squarish. (default "landscape")
  -q, --query string         Limit selection to photos matching a search term.

Global Flags:
  -n, --number int    The number of photos to return (default 10)
  -p, --path string   A path to store the photos (default "/root/Pictures/GoSiMac")

  ERROR   unsplash engine failed: enigne failed: source initiation failed: request failed
1995parham commented 2 years ago

Hi @Xiechengqi, thanks for using gosimac, can you please share with me the way that you lunch the application? I mean ./gosimac ...

Xiechengqi commented 2 years ago

Thanks for reply, I'm trying to batch download images from unsplash

for i in {1..100}
do
    for j in {1..20}
    do
      gosimac unsplash -n 20 -p /mnt/market/unsplash || break
    done
  echo "sleep 10m" && sleep 10m
done
Xiechengqi commented 2 years ago

I think it's a limitation of unsplash access api, I am trying to replace the access key

1995parham commented 2 years ago

Oh, if this is the issue I must make API key configurable.

Xiechengqi commented 2 years ago

Oh, if this is the issue I must make API key configurable.

This could not be better, very cool tool, thank you very much

1995parham commented 2 years ago

So I don't close this issue until I add the configurable API key.

1995parham commented 2 years ago

You can pass token with --token in the unsplash sub-cmmand in the latest release.