GithubHelp home page GithubHelp logo

stevenbenner / interfacelift-downloader Goto Github PK

View Code? Open in Web Editor NEW
90.0 90.0 17.0 102 KB

:floppy_disk: InterfaceLIFT wallpaper auto-downloader script for Node.js.

License: MIT License

JavaScript 100.00%
javascript nodejs wallpapers

interfacelift-downloader's People

Contributors

ashrayjain avatar joeytall avatar rockymadden avatar stevenbenner avatar sunpech avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

interfacelift-downloader's Issues

Docker support for Unraid

Is there any possibility that a version of this can be looked into that could run on Unraid? Doesn't necessarily have to be a GUI docker or anything, but something that would incrementally run and pull any new additions to the site - ideally a version that could support multiple kinds of searches: one for 1920x1080, another for 3440x1440, and each pointing to different destination folders...

Just a thought.

Just not working :)

Hi man, I tried running your project and this is the output. It just runs very fast and nothing is actually downloaded. I suppose they changed something on their side... damn xD

โžœ  interface-lift  interfacelift-downloader 1280x800 ./
InterfaceLIFT Wallpaper Auto-Downloader

Scanning Page 1...
Scanning Page 2...
Scanning Page 3...
Scanning Page 4...
Scanning Page 5...
Scanning Page 6...
Scanning Page 7...
Scanning Page 8...
Scanning Page 9...
Scanning Page 10...
Scanning Page 11...
Scanning Page 12...
Scanning Page 13...

Unhandled 'error' event

Got this error after downloading 155 from about a total of 3000 images

`[3088] Saved: 04007_autumnsunlightthroughthetrees_1280x1024.jpg
events.js:183
throw er; // Unhandled 'error' event
^

Error: read ECONNRESET
at _errnoException (util.js:992:11)
at TCP.onread (net.js:618:25)`

Unhandled 'error' event.

This is happens a few seconds after hitting enter in the command prompt (tried different resolutions just to be sure):

Searching pages for images...
(The download will begin after the page scan finishes.)
Scanning Page 1...
events.js:187
      throw er; // Unhandled 'error' event
      ^

Error: read ECONNRESET
    at TCP.onStreamRead (internal/stream_base_commons.js:201:27)
Emitted 'error' event on ClientRequest instance at:
    at Socket.socketErrorListener (_http_client.js:406:9)
    at Socket.emit (events.js:210:5)
    at emitErrorNT (internal/streams/destroy.js:92:8)
    at emitErrorAndCloseNT (internal/streams/destroy.js:60:3)
    at processTicksAndRejections (internal/process/task_queues.js:80:21) {
  errno: 'ECONNRESET',
  code: 'ECONNRESET',
  syscall: 'read'
}

Rewrite the script to be NPM installable and usable as a global

Since I'm going to be doing some work on this script anyway I might as well make it better.

Right now this is just a simple script designed to be downloaded from GitHub then installed and run by hand. Since no one actually uses this script the mechanical nature of its design hasn't been a concern. However, I can make the script more user-friendly, maintainable, and installable by refactoring the project into an NPM library with a CLI interface.

Requirements:

  • Refactor the core functionality into a library.
  • Refactor the CLI interface into a bin script.
  • Make the path code environment agnostic.
  • Identify the bin entry point of the application in package.json.
  • Set the preferGlobal flag to true in package.json.
  • Publish the project to NPM.

wrong resolution downloaded

Hi, thanks for this tool
I'm trying to download 1920x1200, everything seems to be running fine but the script downloads 1920x1080 images.

Issue with running script with 5120x2880

Hi Steven,

I try running the script and every single time , it has this error below

interfacelift-downloader 5120x2880 /Downloads/5120x2880
InterfaceLIFT Wallpaper Auto-Downloader

Searching pages for images...
(The download will begin after the page scan finishes.)
Scanning Page 1...
Scanning Page 2...
Scanning Page 3...
Scanning Page 4...

events.js:72
throw er; // Unhandled 'error' event
^
Error: read ECONNRESET
at errnoException (net.js:904:11)
at TCP.onread (net.js:558:19)

Support for 5120x2880 resolution

Hi Steven,

Great work on the script, i am using it for my retina Macbook Pro and i have a friend who just bought the 5k iMac and i i am wondering if you can add support for the 5120x2880 resolution

Thanks
Roy
[email protected]

Newbie question

Im unsure if it's me doing something wrong, but I keep on getting the below error. Any ideas please?

interfacelift-downloader 1920x1080
SyntaxError: Unexpected number
at Object.exports.createScript (vm.js:24:10)
at REPLServer.defaultEval (repl.js:221:25)
at bound (domain.js:280:14)
at REPLServer.runBound as eval
at REPLServer. (repl.js:412:12)
at emitOne (events.js:82:20)
at REPLServer.emit (events.js:169:7)
at REPLServer.Interface._onLine (readline.js:210:10)
at REPLServer.Interface._line (readline.js:549:8)
at REPLServer.Interface._ttyWrite (readline.js:826:14)

Script hangs randomly

Firstly, great job with this one!

But I get this code out of the blue.

C:\Users\Vangelis\AppData\Roaming\npm\node_modules\interfacelift-downloader\lib
downloader.js:41
filePath = path.join(downloadPath, fileName[0]);
^
TypeError: Cannot read property '0' of null
at EventEmitter. (C:\Users\Vangelis\AppData\Roaming\npm\node_modu
les\interfacelift-downloader\lib\downloader.js:41:50)
at EventEmitter.emit (events.js:95:17)
at IncomingMessage. (C:\Users\Vangelis\AppData\Roaming\npm\node_m
odules\interfacelift-downloader\lib\downloader.js:68:18)
at IncomingMessage.EventEmitter.emit (events.js:117:20)
at _stream_readable.js:920:16
at process._tickCallback (node.js:415:13)

Thanks for even building this script. Sorting this bug out would be a lifesaver!

More resolutions!

First of all, you've made a great utility! Thanks for that. I was trying to download resolutions such as 3840x2400 and 3360x2100 but got an "is not a known resolution" error. Anyway I can fix that? Maybe something to do with /lib/respaths.json file?

Script fails in node v0.10.0

This script dies with the following error:

interfacelift-downloader.js:124
                var matches = agent.body.match(DLREGEX);
                                   ^
TypeError: Cannot read property 'body' of undefined
    at null.<anonymous> (interfacelift-downloader.js:124:22)
    at EventEmitter.emit (events.js:95:17)
    at HttpAgent._makeRequest (node_modules\http-agent\lib\http-agent.js:158:10)
    at HttpAgent.next (node_modules\http-agent\lib\http-agent.js:142:12)
    at HttpAgent.start (node_modules\http-agent\lib\http-agent.js:109:10)
    at Object.<anonymous> (interfacelift-downloader.js:88:7)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)

Environment:

node --version
v0.10.0

npm --version
1.2.14

It appears that the http-agent library does not work with node 1.10.0. Since that library has not been updated in almost a year it is unlikely that it will be fixed.

Probably need to rewrite the script to use another HTTP library.

"X" is not a known resolution

I've successfully used this tool to download images of the more popular resolutions. Unfortunately, I have a few systems around with multiple monitors and/or less popular screen resolutions -- these systems ARE accommodated by the interfacelift website, but appear NOT to have proper accommodations in the script. All of the following resolutions result in the error "______ is not a known resolution" when entered into the command line:

5120x1600
3200x1200
4800x1200
5040x1200
1600x900
1366x768

Unhandled 'error' event

Hello, thanks for this tool. Makes life easy to download interfacelift wallpapers ๐Ÿ‘

However, I get below error when running the tool without the limit flag. It usually happens at about page 130.

Scanning Page 133...
Scanning Page 134...
node:events:497
      throw er; // Unhandled 'error' event
      ^

Error: socket hang up
    at TLSSocket.socketOnEnd (node:_http_client:516:23)
    at TLSSocket.emit (node:events:531:35)
    at endReadableNT (node:internal/streams/readable:1696:12)
    at process.processTicksAndRejections (node:internal/process/task_queues:82:21)
Emitted 'error' event on ClientRequest instance at:
    at TLSSocket.socketOnEnd (node:_http_client:516:9)
    at TLSSocket.emit (node:events:531:35)
    at endReadableNT (node:internal/streams/readable:1696:12)
    at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
  code: 'ECONNRESET'
}

Node.js v21.6.1

Refactor Downloader() to fix or remove recursion.

Right now the Downloader() object uses recursion to iterate through the list. This is problematic because it will lead to a very large call stack unless you use a setImmediate() to break out of it (see: commit 747ce13).

I do not like the setImmediate() approach because it feels like a code smell. So this object needs to be refactored to either replace the recursion with some flavor of simple iteration or the recursion needs to be implemented in such a way that it wont negatively impact the call stack or memory usage.

Support

Hello, I use your interfacelift downloader since June and I never have problem with it.

Can you help me use it again?

Error that I have:

"Searching pages for images...
(The download will begin after the page scan finishes.)
Scanning Page 1...

events.js:72
throw er; // Unhandled 'error' event
^
Error: getaddrinfo ENOTFOUND
at errnoException (dns.js:37:11)
at Object.onanswer as oncomplete"

Unsupported Resolutions

Hello,

Thank you for the work you've done on this project. It appears that there are a few new resolutions hosted on interfacelift that are not supported by your script:

3840x2400
3840x2160
3360x2100

If you would be able to add these into your script, it would be greatly appreciated!

Feature request

Don't know if this is still being watched, but the ability to specify a date range of the downloads (say, download all wallpapers of a specific resolution since 8/12/2021, or all wallpapers of a specific resolution that are 30 days old or less) would be really excellent.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.