rawnly / splash-cli

A simple, CLI to download Unsplash wallpapers. Nothing fancy — it just works.
http://splash-cli.app?ref=github
546 stars 28 forks source link

404 not found #106

Closed Traigilei closed 2 years ago

Traigilei commented 2 years ago

splash collection get https://unsplash.com/collections/89780811/dog I attemped to download the batched images from collection url, but failed and shown 404 error ✖ GotError [HTTPError]: Response code 404 (Not Found) at /home/ubunlei/.nvm/versions/node/v18.1.0/lib/node_modules/splash-cli/node_modules/got/index.js:386:13 at process.processTicksAndRejections (node:internal/process/task_queues:95:5) { host: 'api.unsplash.com', hostname: 'api.unsplash.com', method: 'GET', path: '/collections/https:/unsplash.com/collections/89780811/dog', protocol: 'https:', url: 'https://api.unsplash.com/collections/https:/unsplash.com/collections/89780811/dog', statusCode: 404, statusMessage: 'Not Found', headers: { connection: 'close', server: 'Cowboy', 'content-type': 'application/json', 'content-language': 'en', 'cache-control': 'no-cache', 'x-ratelimit-limit': '5000', 'x-ratelimit-remaining': '4977', 'x-request-id': 'dddc9150-586b-43cf-94c8-f88cead12679', 'x-runtime': '0.015580', 'content-encoding': 'gzip', 'strict-transport-security': 'max-age=31536000; includeSubDomains', via: '1.1 vegur, 1.1 varnish, 1.1 varnish', 'accept-ranges': 'bytes', date: 'Mon, 16 May 2022 17:46:08 GMT', 'x-served-by': 'cache-iad-kjyo7100082-IAD, cache-qpg1221-QPG', 'x-cache': 'MISS, MISS', 'x-cache-hits': '0, 0', 'x-timer': 'S1652723168.955386,VS0,VE278', vary: 'Accept-Encoding, Origin,Authorization,Accept-Language,Accept', 'transfer-encoding': 'chunked' } }

rawnly commented 2 years ago

As explained in the help command, you have to pass the ID or an alias of the collection, not the URL

-splash collection get https://unsplash.com/collections/89780811/dog
+splash collection get 89780811
Traigilei commented 2 years ago

solve it