Xonshiz / comic-dl

Comic-dl is a command line tool to download manga and comics from various comic and manga sites. Supported sites : readcomiconline.to, mangafox.me, comic naver and many more.
https://github.com/Xonshiz/comic-dl
MIT License
538 stars 68 forks source link

Config Generator not adding cookie option to config.json #335

Closed cstegmann closed 1 year ago

cstegmann commented 1 year ago

When using the the config generator to create a config.json there is no entry regarding the cookie. Running the script / docker container will result in an error:

2023-03-01 15:06:03 Traceback (most recent call last):
2023-03-01 15:06:03   File "/opt/comic-dl/cli.py", line 5, in <module>
2023-03-01 15:06:03     main()
2023-03-01 15:06:03   File "/opt/comic-dl/comic_dl/__main__.py", line 20, in main
2023-03-01 15:06:03     ComicDL(sys.argv[1:])
2023-03-01 15:06:03   File "/opt/comic-dl/comic_dl/comic_dl.py", line 135, in __init__
2023-03-01 15:06:03     manual_cookie = data["cookie"]
2023-03-01 15:06:03 KeyError: 'cookie'

Example output from docker run -it --name comic-dl-config --rm -v /c/Users/Username/ComicDL:/directory:rw -w /directory ghcr.io/xonshiz/comic-dl:latest_linux_amd64 comic_dl -dd /directory --config :

{
    "download_directory": "comics",
    "sorting_order": "ascending",
    "Configconversion": "cbz",
    "keep": "False",
    "image_quality": "Best",
    "comics": {
        "https://fanfox.net/manga/the_youngest_son_of_a_master_swordsman/": {
            "url": "https://fanfox.net/manga/the_youngest_son_of_a_master_swordsman/",
            "next": 1,
            "last": "None",
            "username": "None",
            "password": "None",
            "comic_language": "0"
        }
    }
}

Adding a "cookie": "None", data entry to the config.json file lets the script run as normal when using the --auto flag.