error: invalid character

#47 · open · 10 comments

View on GitHub ↗

Arunas-g

After an unsuccessful attempt to download a video (for any reason), the next attempt is not possible due to an error ![Снимок экрана от 2023-11-27 13-12-09](https://github.com/akiomik/vimeo-dl/assets/58878676/e8adde5a-f9e8-4496-971f-2e39633f52d5)

Comments

Arunas-g

> After an unsuccessful attempt to download a video (for any reason), the next attempt is not possible due to an error ![Снимок экрана от 2023-11-27 13-12-09](https://private-user-images.githubusercontent.com/58878676/285768890-e8adde5a-f9e8-4496-971f-2e39633f52d5.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTEiLCJleHAiOjE3MDE0MDY3NjksIm5iZiI6MTcwMTQwNjQ2OSwicGF0aCI6Ii81ODg3ODY3Ni8yODU3Njg4OTAtZThhZGRlNWEtZjllOC00NDk2LTk3MWYtMmUzOTYzM2Y1MmQ1LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFJV05KWUFYNENTVkVINTNBJTJGMjAyMzEyMDElMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjMxMjAxVDA0NTQyOVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWZmZGIyOWY3MDEwOTc3ODBlZTI1MzBkMjU3ZDA1ZTIyYzkyZjQ5YzY3ZTZiNjhkYThmNWNiZWQ3NWFiM2Q4ZjkmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.wlXkTfTo-96ex9qdnffGaKoLQMveCmHdyvclpwGtWMA) I used the wrong video link. After using the correct link, the video and audio downloaded, but the formation of a single file does not occur due to the error: ![image](https://github.com/akiomik/vimeo-dl/assets/58878676/044139ae-7465-4c95-ba78-ed89acca2bb9)

Arunas-g

> After an unsuccessful attempt to download a video (for any reason), the next attempt is not possible due to an error ![Снимок экрана от 2023-11-27 13-12-09](https://private-user-images.githubusercontent.com/58878676/285768890-e8adde5a-f9e8-4496-971f-2e39633f52d5.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTEiLCJleHAiOjE3MDE0MDY4OTksIm5iZiI6MTcwMTQwNjU5OSwicGF0aCI6Ii81ODg3ODY3Ni8yODU3Njg4OTAtZThhZGRlNWEtZjllOC00NDk2LTk3MWYtMmUzOTYzM2Y1MmQ1LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFJV05KWUFYNENTVkVINTNBJTJGMjAyMzEyMDElMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjMxMjAxVDA0NTYzOVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWJiZTNhMmFhZTI2ODZlMTdlYWI2ODlkZTgwMTZhZGNmMWY4YTIwNGQ1YjlkNzY5ZDAyMGI0NmVkNjA2MjZkMzkmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.KjohiB5IRGfaocUxZktusFXy7_R0STjBCEMU4WArjzw) After any unsuccessful attempt to run the program, an error appears: ![image](https://github.com/akiomik/vimeo-dl/assets/58878676/a5606b2c-be1e-4856-b7d6-a068fb7b0b8a)

guillecro

Having the same problem ```bash zaqueo@mapache:~$ ./vimeo-dl -i "https://31vod-adaptive.akamaized.net/exp=1699898087~acl=%2F9623fbc8-c3af-4e18-aa8d-fa2568f3d14e%2F%2A~hmac=a26c47dad47d2be7cf6f3dec8aa803393dc8da92066b4fe23a9b824ddae15f2f/9623fbc8-c3af-4e18-aa8d-fa2568f3d14e/sep/video/2961fbf1,4ef88d62,5489b398,63eb560e,b240ca77/audio/3f39fbe8,b422eff1,ff355f89/master.json?base64_init=1&query_string_ranges=1" --video-id "b240ca77" --audio-id "3f39fbe8" --combine --user-agent "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36" Error: invalid character '<' looking for beginning of value ``` Will check out the code maybe I can find the error and maybe make a hotfix PD: Trying in ubuntu. Will test with Windows now.

sceptre0

@guillecro Did you find anything ? I'm facing the same issue.

nitin-gyany

Any luck, @guillecro @akiomik on this issue? I can't trace this error in the source.

biasply-casual

Anyone found a solution, I'm getting this invalid character "<" as well with Windows?

DobleV55

same error in Mac

arobase-che

`Error: invalid character '<' looking for beginning of value` Is it a common Go issue when parsing HTML with JSON (or a the string `<nil>`, but whatever). It's a Cloudflare spambot protection page that prevent access to the main json file (the one that got every data about the segments of the videos). **The solution**: Just get the `master.json` and give it to vimeo-dl. Instruction: - From the "Network tab" of the development tools (Ctrl + Shift + E on Firefox, I guess it's F12 + Click on the Network tab). - Found the URL of the `master.json` file. - Right click => Copy URL. [vimeo-dl](https://github.com/akiomik/vimeo-dl) can have this json URL as input. (`vimeo-dl -i JSON_URL`). I got in the end a `Conversion failed!` error but at least I have the video and the audio. 🤷 **Edit**: I can confirm that `ffmpeg -i video.mp4 -i audio.mp4 -c copy video_merged.mp4` worked instantly. For my use-case I don't need to search more. Maybe [yt-dlp/yt-dlp](https://github.com/yt-dlp/yt-dlp) can support master.json too. I will check it out.

softyoda

I haven't found any .json on vimeo network path.

arobase-che

For example, on this video: https://vimeo.com/358768871 Don't you find something like `https://vod-adaptive-ak.vimeocdn.com/exp=1760299020~acl=XXX/v2/playlist/av/primary/prot/cXNyPTE/playlist.json` » in the network tab ? (You shouldn't event need to start the video, just load the page). I just tried it and it worked.