Xonshiz / anime-dl

Anime-dl is a command-line program to download anime from CrunchyRoll and Funimation.
MIT License
229 stars 37 forks source link

No files appearing in the Output folder #70

Open ehllie opened 5 years ago

ehllie commented 5 years ago

I use the command sudo ./__main__.py -u "username" -p "password" -r 1080p -i https://www.crunchyroll.com/zombie-land-saga/episode-1-good-morning-saga-777617 The program manages to log in and begin downloads. However at the end, there is an error: /bin/sh: 1: Syntax error: "(" unexpected The Output folder has a subfolder with an appropriate name but it has no files in it however.

Here's the contents of Error Log that got created after running the program with option --verbose and the entire console output. https://gist.github.com/oscaretti/1980debf34d70d3503e1c37baa7f6cf4 https://gist.github.com/oscaretti/a1a677337b94cecec959f38b639c2c4a

Xonshiz commented 5 years ago

Thanks for the detailed output. I'll look into it.

DeadEndGG commented 5 years ago

DEBUG: Operating System : Linux - 4.9.0-8-amd64 - #1 SMP Debian 4.9.110-3+deb9u6 (2018-10-08)

You need to escape mkv_merge_command before calling:

subprocess.call(mkv_merge_command, shell=True)

If you want a quick solution for your issue just modify the file sites/crunchyroll.py and escape the parenthesis using replace.

                       mkv_merge_command = 'mkvmerge --ui-language en_US --output "%s" ' % str(file_name).replace(
                            ".mp4",
                            ".mkv") + '"' + str(
                            file_name) + '" ' + ' '.join(subs_files) + ' ' + str(fonts)

                       mkv_merge_command = mkv_merge_command.replace("(", "\(").replace(")", "\)")

                        logging.debug("mkv_merge_command : %s", mkv_merge_command)

                        try:
                            subprocess.call(mkv_merge_command, shell=True)

I am sorry if my comment lacks content... I have never commented anything before on GitHub..

Xonshiz commented 5 years ago

Thanks @dsmaceiras . I'll look into this.