ethanfann / slackmojis-dl Goto Github PK
View Code? Open in Web Editor NEWDownloads emojis from https://slackmojis.com/
License: MIT License
Downloads emojis from https://slackmojis.com/
License: MIT License
Note: Current setup would obtain all the pages and then download the desired number which defeats the main purpose for testing in dev which is to run quickly
Load the emoji/ folder, and filter those out from the download list
OS: Windows 10
Shell: Powershell
Steps:
git clone https://github.com/ethanfann/slackmojis-downloader
cd slackmojis-downloader
npm install
npm start
After running npm start, the following is output:
PS C:\Users\Chris\Documents\dev\slackmojis-downloader> npm start
> [email protected] start C:\Users\Chris\Documents\dev\slackmojis-downloader
> node cli.js
⠼ Requesting Emoji Listing
Error: Request failed with status code 503
at createError (C:\Users\Chris\Documents\dev\slackmojis-downloader\node_modules\axios\lib\core\createError.js:16:15)
at settle (C:\Users\Chris\Documents\dev\slackmojis-downloader\node_modules\axios\lib\core\settle.js:17:12)
at IncomingMessage.handleStreamEnd (C:\Users\Chris\Documents\dev\slackmojis-downloader\node_modules\axios\lib\adapters\http.js:260:11)
at IncomingMessage.emit (events.js:215:7)
at endReadableNT (_stream_readable.js:1183:12)
at processTicksAndRejections (internal/process/task_queues.js:80:21)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start: `node cli.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Chris\AppData\Roaming\npm-cache\_logs\2021-03-05T09_10_33_729Z-debug.log
Expected behaviour:
It downloads the emoji
Hello work fine but only download from home index page, not full list like https://slackmojis.com/emojis/popular
The developer behind Slackmojis has been kind enough to support pagination! Opening this up to track progress made towards supporting the updated endpoint.
The good news is I've fixed this by introducing pagination. https://slackmojis.com/emojis.json?page=0 now returns the first 500 emojis, then one can keep incrementing the the page number until it returns an empty array, signaling the end. Right now there are ~40 pages.
I'm getting the following error trying to use this.
ERROR Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
1. You might have mismatching versions of React and the renderer (such as React DOM)
2. You might be breaking the Rules of Hooks
3. You might have more than one copy of React in the same app
See https://fb.me/react-invalid-hook-call for tips about how to debug and fix this problem.
- 1. You might have mismatching versions of React and the renderer (such as React DOM)
- 2. You might be breaking the Rules of Hooks
- 3. You might have more than one copy of React in the same app
- See https://fb.me/react-invalid-hook-call for tips about how to debug and fix this problem.
- resolveDispatcher (/Users/gerrit/.npm/_npx/aeb2546094ea8b99/node_modules/slackmojis-dl/node_modules/react/cjs/react.development.js:1465:13)
- Object.useState (/Users/gerrit/.npm/_npx/aeb2546094ea8b99/node_modules/slackmojis-dl/node_modules/react/cjs/react.development.js:1496:20)
- App (/Users/gerrit/.npm/_npx/aeb2546094ea8b99/node_modules/slackmojis-dl/ui.js:36:47)
- renderWithHooks (/Users/gerrit/.npm/_npx/aeb2546094ea8b99/node_modules/react-reconciler/cjs/react-reconciler.development.js:6412:18)
- mountIndeterminateComponent (/Users/gerrit/.npm/_npx/aeb2546094ea8b99/node_modules/react-reconciler/cjs/react-reconciler.development.js:9238:13)
- beginWork (/Users/gerrit/.npm/_npx/aeb2546094ea8b99/node_modules/react-reconciler/cjs/react-reconciler.development.js:10476:16)
- Object.invokeGuardedCallbackProd (/Users/gerrit/.npm/_npx/aeb2546094ea8b99/node_modules/react-reconciler/cjs/react-reconciler.development.js:12101:10)
- invokeGuardedCallback (/Users/gerrit/.npm/_npx/aeb2546094ea8b99/node_modules/react-reconciler/cjs/react-reconciler.development.js:12292:31)
- beginWork$1 (/Users/gerrit/.npm/_npx/aeb2546094ea8b99/node_modules/react-reconciler/cjs/react-reconciler.development.js:16531:7)
- performUnitOfWork (/Users/gerrit/.npm/_npx/aeb2546094ea8b99/node_modules/react-reconciler/cjs/react-reconciler.development.js:15340:12)
- workLoopSync (/Users/gerrit/.npm/_npx/aeb2546094ea8b99/node_modules/react-reconciler/cjs/react-reconciler.development.js:15268:5)
- renderRootSync (/Users/gerrit/.npm/_npx/aeb2546094ea8b99/node_modules/react-reconciler/cjs/react-reconciler.development.js:15231:7)
- performSyncWorkOnRoot (/Users/gerrit/.npm/_npx/aeb2546094ea8b99/node_modules/react-reconciler/cjs/react-reconciler.development.js:14821:18)
- (/Users/gerrit/.npm/_npx/aeb2546094ea8b99/node_modules/react-reconciler/cjs/react-reconciler.development.js:2546:26)
- unstable_runWithPriority (/Users/gerrit/.npm/_npx/aeb2546094ea8b99/node_modules/scheduler/cjs/scheduler.development.js:468:12)
- runWithPriority (/Users/gerrit/.npm/_npx/aeb2546094ea8b99/node_modules/react-reconciler/cjs/react-reconciler.development.js:2495:10)
Hello and thank you for writing this library. When working with network requests apparently mac os creates a .DS_Store file, which triggers an error when scanning the emojis folder:
Mac OS X has an annoying habit of littering network shares with .DS_Store (Desktop Services Store) files. If you only use Mac OS X and other Unix based systems you may never actually see them, but in mixed environments they can become a bit of a nuisance. There is nothing critical stored in .DS_Store files, just Finder specific settings, such as icons size and location, view settings, etc.
So mac users need to temporarily disable the creation of this file when downloading icons by running the following command in the console:
defaults write com.apple.desktopservices DSDontWriteNetworkStores true
and once they are done reverting that:
defaults write com.apple.desktopservices DSDontWriteNetworkStores false
Maybe you could include this in the readme file! :)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.