KevCui / animepahe-dl

:arrow_down: animepahe anime downloader
Do What The F*ck You Want To Public License
101 stars 24 forks source link

parse error: Invalid literal at line 1, column 4 #64

Closed Dwight123-crypto closed 2 years ago

Dwight123-crypto commented 2 years ago

Having this error recently, don't know what seems to be wrong??? It's working fine before. image

KevCui commented 2 years ago

Hi @Dwight123-crypto, I tried the same command and the download of ee720839-7463-2d78-f019-b5adb1f8b1cc started on my machine. Could you please try this command again?

If it's still not working, please run the command with the flag -d in the end. This will print out logs for debug. Paste the logs here and I will then take a closer look.

Dwight123-crypto commented 2 years ago

Hi, @KevCui I tried it again, but the anime could be found now... image ...so search for the same anime again the 'Kaguya-sama wa Kokurasetai: Ultra Romantic', it now generated a new slug, but when I run it, still gives the same error:

parse error: Invalid literal at line 1, column 4

I tried the debug flag -d, and here are the log results:

$ ./animepahe-dl.sh -s 3cf3dd4e-bf52-3622-5a7b-55de2b2978a6 -e "*" -r 720 -d
+ getopts :hlda:s:e:r:t:o: opt
+ set_var
++ command -v curl
+ _CURL=/mingw64/bin/curl
++ command -v jq
+ _JQ=/c/ProgramData/chocolatey/bin/jq
++ command -v fzf
+ _FZF=/c/ProgramData/chocolatey/bin/fzf
++ command -v node
+ _NODE='/c/Program Files/nodejs/node'
++ command -v ffmpeg
+ _FFMPEG=/c/ProgramData/chocolatey/bin/ffmpeg
+ [[ 1 -gt 1 ]]
+ _HOST=https://animepahe.com
+ _ANIME_URL=https://animepahe.com/anime
+ _API_URL=https://animepahe.com/api
+ _REFERER_URL=https://kwik.cx/
+++ realpath ./animepahe-dl.sh
++ dirname /d/jibun/anime/animepahe-dl-master/animepahe-dl.sh
+ _SCRIPT_PATH=/d/jibun/anime/animepahe-dl-master
+ _ANIME_LIST_FILE=/d/jibun/anime/animepahe-dl-master/anime.list
+ _SOURCE_FILE=.source.json
+ _COOKIE=__ddg2=
+ [[ -n '' ]]
+ download_anime_list
+ /mingw64/bin/curl --compressed -sS https://animepahe.com/anime -H 'Cookie: __ddg2='
+ grep /anime/
+ sed -E 's/.*anime\//[/;s/" title="/] /;s/\">.*//'
+ [[ -z 3cf3dd4e-bf52-3622-5a7b-55de2b2978a6 ]]
+ [[ 3cf3dd4e-bf52-3622-5a7b-55de2b2978a6 == '' ]]
++ grep 3cf3dd4e-bf52-3622-5a7b-55de2b2978a6 /d/jibun/anime/animepahe-dl-master/anime.list
++ tail -1
++ awk -F '] ' '{print $2}'
++ sed -E 's/[^[:alnum:] .,\+\-\)\(]/_/g'
+ _ANIME_NAME='Kaguya_sama wa Kokurasetai_ Ultra Romantic'
+ [[ Kaguya_sama wa Kokurasetai_ Ultra Romantic == '' ]]
+ download_source
+ local id d p n
+ mkdir -p '/d/jibun/anime/animepahe-dl-master/Kaguya_sama wa Kokurasetai_ Ultra Romantic'
++ get_anime_id 3cf3dd4e-bf52-3622-5a7b-55de2b2978a6
++ /mingw64/bin/curl --compressed -sS -L https://animepahe.com/anime/3cf3dd4e-bf52-3622-5a7b-55de2b2978a6 -H 'Cookie: __ddg2='
++ grep getJSON
++ sed -E 's/.*id=//'
++ awk -F '&' '{print $1}'
+ id=
++ get_episode_list '' 1
++ /mingw64/bin/curl --compressed -sS 'https://animepahe.com/api?m=release&id=&sort=episode_asc&page=1' -H 'Cookie: __ddg2='
+ d='not enough arguments'
++ /c/ProgramData/chocolatey/bin/jq -r .last_page
parse error: Invalid literal at line 1, column 4
+ p=
KevCui commented 2 years ago

Hey @Dwight123-crypto, from the logs, it looks like you are using an old script. Please pull the recent changes from this repository and give it a try.

Dwight123-crypto commented 2 years ago

Hey @KevCui , it literally solved the issue image Thanks man!