Coder Social home page Coder Social logo

vignedev / twist-dl Goto Github PK

View Code? Open in Web Editor NEW
29.0 7.0 5.0 94 KB

Simple Twist.moe/AnimeTwist anime downloader in CLI with support for batch downloading.

License: MIT License

JavaScript 100.00%
anime downloader anime-downloader twist-moe twist-moe-downloader animetwist

twist-dl's People

Contributors

josethen avatar legoandmars avatar smhmd avatar vignedev 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

twist-dl's Issues

Source string encryption has changed on newer shows

Also, It seems that the episode source string encryption has changed for newer shows. Using the current aesKey variable returns a Mailformed UTF-8 data error when trying to download newer shows.

Source string for an episode uploaded last year:

U2FsdGVkX19VIjFyu28cnS0zfwOuRHZsp6v/4AY6jInIMHtkvAmWiLbzzfsgUdOrQ0U/ItuTAEtALBd+8x799AaytZUjjDcg/sAKgBD5+ZY56hfmlisbwoCNj/aXZYxBv5heSRtWbjG+DuHUzVHmMQ==

length = 152

Source for a new show uploaded a few days ago:

U2FsdGVkX1+tXF3Nk1ZTrSn5Qj7VifQG9e2rPIIF8F23bC8hjfq7IjfZ3sQ7g73ZwKWsuawDOSdWvcajp74ZN/KJn40YpGENlGw87//oUiVHJBHrgkq108qukZ+OAfENpIzmLxrf5gnK/0Kpu2mEFAchR28/29LFNwbxYdHd82VlkZyJGO+7idbIx9jwfgMJ

length = 192

So its quite a bit longer

Unsure as to whether or not this encryption change will be changed on all existing sources as well, but might be a good idea to keep in mind that they might.

"Server responded with 401 (Unauthorized)"

Hello, it's me again. I'm sorry for not responding the last time. The google account I'm using is not my default google account and thus I don't receive notification mails in my main e-mail client, which is why I didn't notice the response (had not tried again ever since and a friend had the same issue, so I just assumed the program or website broke).

Last thread was this one: #19

I saw your response. Thinking this might be a problem with my used version, I re-downloaded the program. Same result as last time.
I use a .cmd file to access the interface more quickly, but while that worked fine before, nowadays it just instantly closes for some reason.
If I access my path manually and go either via interface or with pure commands, I get the "unauthorized" error again. I didn't record it with the interface, but in that case the error appears the moment I search for a title (in the example below: once I type in "Charlotte" and press enter, I get no results but instead the "Unauthorized" error)
I attached a video file to properly show my setup.

2021-05-20.19-06-55.mp4

Thank you in advance!

Accessibility: Move down on select

For accessibility/usability, it would be great if selecting an episode (using space) would also move down once (whether you are selecting or unselecting)
image
image

Meaning, you can select a range of EPs by pressing space for a while. Inspired by how lf works.

Request path contains unescaped characters

Hi,

when running this command: twist-dl -a "quanzhi-fashi-4th-season" -e 1

I get the following:

Quanzhi Fashi 4th Season
error: Failed to download episode 1
TypeError [ERR_UNESCAPED_CHARACTERS]: Request path contains unescaped characters
at new ClientRequest (_http_client.js:116:13)
at request (https.js:289:10)
at /usr/local/lib/node_modules/twist-dl/node_modules/node-fetch/lib/index.js:1438:15
at new Promise ()
at fetch (/usr/local/lib/node_modules/twist-dl/node_modules/node-fetch/lib/index.js:1407:9)
at Promise (/usr/local/lib/node_modules/twist-dl/index.js:132:9)

This is true for any episode from that season of the anime.

Thanks in advance!

Can not run script on Ubuntu 18.04 Server

I am running a fresh Ubuntu 18.04 Server install under the root user
I install nodeJS and npm from this repository using curl without any issues or errors
https://deb.nodesource.com/setup_12.x

I checked the NodeJS version and npm version and I get this back
npm -v 6.13.4 | nodejs -v v12.16.1

After that I ran
npm i twist-dl -g
It downloaded/installed the module without any issues

However when I run the twist-dl script I get this back every time and nothing else.

/usr/bin/env: ‘node\r’: No such file or directory

I have tried a bunch of different ways of installing nodejs, npm; I still have this problem with different version of nodejs as well.
I have tried it on a windows machine and have had no issues. I am only having issues with Ubuntu 18.04 Server

403 Error

is it only me?
error: Failed to download episode
Server responded with 403 (Forbidden)

Download interrupted without error

Download will freeze and the program will be exited with out any warnings or error.
Episode 11 (1/3) [==......................] 1478340/bps 7% 102.6s C:\Users\auser\folder>

Could be due to loading too fast.

gui?

can you guys make a gui? if no, how would i go about making a gui?

thanks.

When multiple anime start with the provided `--anime` flag, allow the user to pick the correct anime via command line arguments

I'm trying to download the entirety JoJo's Bizarre Adventure, but downloading it is frustrating because the name for the first season, jojo-s-bizarre-adventure, is also the start for the other 4 seasons.

A potential fix would be to allow a RegEx for the --anime flag (--anime-reg?), or to at least allow a method of saying "This is the entire title; Do not match anything else". (perhaps 'jojo-s-bizarre-adventure'. Note the single quotes, because in Windows command prompt there is no easy way to pass a double quote as an argument)

For now, doing twist-dl -e 1-9 then selecting the correct anime from the drop-down works, but is unweildly. Not to mention that trying to automate downloading all anime in a list would be severely limited by that, as it requires user input.

If there's already a solution for this, then I'd like it to be made more clear in the help message.
Note: attempting to do twist-dl twist.moe/a/jojo-s-bizarre-adventure/1 results in downloading DIU (jojo-s-bizarre-adventure-diamond-is-unbreakable), and attempting to use the --episode flag with a URL simply outputs the help text

Episode-Selection

If you search for an anime and than want to select an episode greater than 10 it won't work.
You can only use number 0-9 on the keyboard. Or 'a' 'g' 'i' to select all. That's for me on a mac.

Socket Hang Up

I just freshyl installed twist-dl on WSL and i'm getting the following message

twist-dl -a "Mushoku Tensei" -e 1-latest
error: { FetchError: request to https://twist.moe/api/anime failed, reason: socket hang up
at ClientRequest. (/usr/local/lib/node_modules/twist-dl/node_modules/node-fetch/lib/index.js:1461:11)
at ClientRequest.emit (events.js:198:13)
at TLSSocket.socketOnEnd (_http_client.js:435:9)
at TLSSocket.emit (events.js:203:15)
at endReadableNT (_stream_readable.js:1145:12)
at process._tickCallback (internal/process/next_tick.js:63:19)
message:
'request to https://twist.moe/api/anime failed, reason: socket hang up',
type: 'system',
errno: 'ECONNRESET',
code: 'ECONNRESET' }

Download interrupted without error

Download will freeze and the program will be exited with out any warnings or error.
Episode 11 (1/3) [==......................] 1478340/bps 7% 102.6s C:\Users\auser\folder>

Could be due to loading too fast.

node version v14.15.1
I accidentally closed the issue.

can't download

I keep getting this error

error: { Error: EEXIST: file already exists, mkdir '/home/darmini'
at Object.fs.mkdirSync (fs.js:885:18)
at /usr/local/lib/node_modules/twist-dl/index.js:78:12
at
at process._tickCallback (internal/process/next_tick.js:188:7)
errno: -17,
code: 'EEXIST',
syscall: 'mkdir',
path: '/home/darmini' }

Outdated x-access-token

old: 1rj2vRtegS8Y60B3w3qNZm5T2Q0TN2NR
new: 0df14814b9e590a1f26d3071a4ed7974

Old one doesnt seem to work anymore. Returns a 401 access denied

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.