Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Download link likely expired and stream is privated or members only, cannot continue download #233

Open
Kiritomo opened this issue Dec 2, 2024 · 7 comments

Comments

@Kiritomo
Copy link

Kiritomo commented Dec 2, 2024

use ytarchive to record multiple livestreams, the message "Download link likely expired and stream is privated or members only, cannot continue downloading" will appear.
This problem occurs not only in Windows but also in Linux.

D:\test>ytarchive.exe --proxy "socks5://127.0.0.1:7890" --disable-save-state --write-thumbnail --mkv --write-mux-file --debug https://www.youtube.com/watch?v=hhiU5ZK40oQ best
ytarchive 0.5.0
2024/12/02 11:00:59 Channel: PGL
2024/12/02 11:00:59 Video Title: [A] PWE CS2 SHANGHAI MAJOR 2024 - OPENING STAGE - Day 3
2024/12/02 11:00:59 DEBUG: Retrieving URLs from web DASH manifest
2024/12/02 11:00:59 DEBUG: Retrieving URLs from web adaptive formats
2024/12/02 11:00:59 Selected quality: 2160p60 (VP9)
2024/12/02 11:00:59 Stream started at time 2024-12-02T02:39:02+00:00
2024/12/02 11:01:00 INFO: Starting download to D:\test\hhiU5ZK40oQ__4107813068\[A] PWE CS2 SHANGHAI MAJOR 2024 - OPENING STAGE - Day 3-hhiU5ZK40oQ.f140.ts
2024/12/02 11:01:00 INFO: Starting download to D:\test\hhiU5ZK40oQ__4107813068\[A] PWE CS2 SHANGHAI MAJOR 2024 - OPENING STAGE - Day 3-hhiU5ZK40oQ.f315.ts
2024/12/02 11:01:27 DEBUG: video1: HTTP Error for fragment 14: 403 Forbidden
2024/12/02 11:01:27 DEBUG: video: Attempting to retrieve a new download URL
2024/12/02 11:01:28 DEBUG: Retrieving URLs from web DASH manifest
2024/12/02 11:01:29 DEBUG: Retrieving URLs from web adaptive formats
2024/12/02 11:01:57 DEBUG: audio1: HTTP Error for fragment 165: 403 Forbidden
2024/12/02 11:01:57 DEBUG: audio: Attempting to retrieve a new download URL
2024/12/02 11:01:58 DEBUG: Retrieving URLs from web DASH manifest
2024/12/02 11:01:58 DEBUG: Retrieving URLs from web adaptive formats
2024/12/02 11:02:28 DEBUG: audio1: HTTP Error for fragment 213: 403 Forbidden
2024/12/02 11:02:28 DEBUG: audio: Attempting to retrieve a new download URL
2024/12/02 11:02:28 DEBUG: Retrieving URLs from web DASH manifest
2024/12/02 11:02:28 DEBUG: Retrieving URLs from web adaptive formats
2024/12/02 11:02:58 DEBUG: audio1: HTTP Error for fragment 265: 403 Forbidden
2024/12/02 11:02:58 DEBUG: audio: Attempting to retrieve a new download URL
2024/12/02 11:02:58 DEBUG: Retrieving URLs from web DASH manifest
2024/12/02 11:02:59 DEBUG: Retrieving URLs from web adaptive formats
2024/12/02 11:03:28 DEBUG: audio1: HTTP Error for fragment 299: 403 Forbidden
2024/12/02 11:03:28 DEBUG: audio: Attempting to retrieve a new download URL
2024/12/02 11:03:29 DEBUG: Retrieving URLs from web DASH manifest
2024/12/02 11:03:29 DEBUG: Retrieving URLs from web adaptive formats
2024/12/02 11:03:58 DEBUG: video1: HTTP Error for fragment 104: 403 Forbidden
2024/12/02 11:03:58 DEBUG: video: Attempting to retrieve a new download URL
2024/12/02 11:03:58 DEBUG: Retrieving URLs from web DASH manifest
2024/12/02 11:03:58 DEBUG: Retrieving URLs from web adaptive formats
2024/12/02 11:04:28 DEBUG: video1: HTTP Error for fragment 128: 403 Forbidden
2024/12/02 11:04:28 DEBUG: video: Attempting to retrieve a new download URL
2024/12/02 11:04:28 DEBUG: Retrieving URLs from web DASH manifest
2024/12/02 11:04:28 DEBUG: Retrieving URLs from web adaptive formats
2024/12/02 11:04:58 DEBUG: audio1: HTTP Error for fragment 317: 403 Forbidden
2024/12/02 11:04:58 DEBUG: audio: Attempting to retrieve a new download URL
2024/12/02 11:04:58 DEBUG: video1: HTTP Error for fragment 135: 403 Forbidden
2024/12/02 11:04:58 DEBUG: Retrieving URLs from web DASH manifest
2024/12/02 11:04:59 DEBUG: Retrieving URLs from web adaptive formats
2024/12/02 11:05:28 DEBUG: video1: HTTP Error for fragment 147: 403 Forbidden
2024/12/02 11:05:28 DEBUG: video: Attempting to retrieve a new download URL
2024/12/02 11:05:28 DEBUG: audio1: HTTP Error for fragment 323: 403 Forbidden
2024/12/02 11:05:28 DEBUG: Retrieving URLs from web DASH manifest
2024/12/02 11:05:28 DEBUG: Retrieving URLs from web adaptive formats
2024/12/02 11:05:58 DEBUG: video1: HTTP Error for fragment 161: 403 Forbidden
2024/12/02 11:05:58 DEBUG: video: Attempting to retrieve a new download URL
2024/12/02 11:05:58 DEBUG: audio1: HTTP Error for fragment 329: 403 Forbidden
2024/12/02 11:05:59 DEBUG: Retrieving URLs from web DASH manifest
2024/12/02 11:05:59 DEBUG: Retrieving URLs from web adaptive formats
2024/12/02 11:06:29 DEBUG: audio1: HTTP Error for fragment 335: 403 Forbidden
2024/12/02 11:06:29 DEBUG: audio: Attempting to retrieve a new download URL
2024/12/02 11:06:30 DEBUG: Retrieving URLs from web DASH manifest
2024/12/02 11:06:30 DEBUG: Retrieving URLs from web adaptive formats
2024/12/02 11:06:59 DEBUG: video1: HTTP Error for fragment 188: 403 Forbidden
2024/12/02 11:06:59 DEBUG: video: Attempting to retrieve a new download URL
2024/12/02 11:07:00 DEBUG: Retrieving URLs from web DASH manifest
2024/12/02 11:07:00 DEBUG: Retrieving URLs from web adaptive formats
2024/12/02 11:07:29 DEBUG: video1: HTTP Error for fragment 203: 403 Forbidden
2024/12/02 11:07:29 DEBUG: video: Attempting to retrieve a new download URL
2024/12/02 11:07:29 DEBUG: Retrieving URLs from web DASH manifest
2024/12/02 11:07:29 DEBUG: Retrieving URLs from web adaptive formats
2024/12/02 11:07:59 DEBUG: video1: HTTP Error for fragment 239: 403 Forbidden
2024/12/02 11:07:59 DEBUG: video: Attempting to retrieve a new download URL
2024/12/02 11:07:59 DEBUG: Retrieving URLs from web DASH manifest
2024/12/02 11:07:59 DEBUG: Retrieving URLs from web adaptive formats
2024/12/02 11:08:33 DEBUG: audio1: HTTP Error for fragment 360: 403 Forbidden
2024/12/02 11:08:33 DEBUG: audio: Attempting to retrieve a new download URL
2024/12/02 11:08:33 DEBUG: Retrieving URLs from web DASH manifest
2024/12/02 11:08:33 DEBUG: Retrieving URLs from web adaptive formats
2024/12/02 11:09:03 DEBUG: video1: HTTP Error for fragment 293: 403 Forbidden
2024/12/02 11:09:03 DEBUG: video: Attempting to retrieve a new download URL
2024/12/02 11:09:03 DEBUG: Retrieving URLs from web DASH manifest
2024/12/02 11:09:03 DEBUG: Retrieving URLs from web adaptive formats
2024/12/02 11:09:33 DEBUG: audio1: HTTP Error for fragment 372: 403 Forbidden
2024/12/02 11:09:33 DEBUG: audio: Attempting to retrieve a new download URL
2024/12/02 11:09:34 DEBUG: Retrieving URLs from web DASH manifest
2024/12/02 11:09:34 DEBUG: Retrieving URLs from web adaptive formats
2024/12/02 11:10:03 DEBUG: video1: HTTP Error for fragment 332: 403 Forbidden
2024/12/02 11:10:03 DEBUG: video: Attempting to retrieve a new download URL
2024/12/02 11:10:04 DEBUG: Retrieving URLs from web DASH manifest
2024/12/02 11:10:04 DEBUG: Retrieving URLs from web adaptive formats
2024/12/02 11:10:34 DEBUG: video1: HTTP Error for fragment 358: 403 Forbidden
2024/12/02 11:10:34 DEBUG: video: Attempting to retrieve a new download URL
2024/12/02 11:10:34 DEBUG: Retrieving URLs from web DASH manifest
2024/12/02 11:10:34 DEBUG: Retrieving URLs from web adaptive formats
2024/12/02 11:11:04 DEBUG: video1: HTTP Error for fragment 384: 403 Forbidden
2024/12/02 11:11:04 DEBUG: video: Attempting to retrieve a new download URL
2024/12/02 11:11:04 DEBUG: Retrieving URLs from web DASH manifest
2024/12/02 11:11:05 DEBUG: Retrieving URLs from web adaptive formats
2024/12/02 11:11:33 DEBUG: video1: HTTP Error for fragment 392: 403 Forbidden
2024/12/02 11:11:33 DEBUG: video: Attempting to retrieve a new download URL
2024/12/02 11:11:34 DEBUG: Retrieving URLs from web DASH manifest
2024/12/02 11:11:34 DEBUG: Retrieving URLs from web adaptive formats
2024/12/02 11:12:06 DEBUG: video1: HTTP Error for fragment 401: 403 Forbidden
2024/12/02 11:12:06 DEBUG: video: Attempting to retrieve a new download URL
2024/12/02 11:12:07 DEBUG: Retrieving URLs from web DASH manifest
2024/12/02 11:12:07 DEBUG: Retrieving URLs from web adaptive formats
2024/12/02 11:12:38 DEBUG: video1: HTTP Error for fragment 407: 403 Forbidden
2024/12/02 11:12:38 DEBUG: video: Attempting to retrieve a new download URL
2024/12/02 11:12:38 DEBUG: Retrieving URLs from web DASH manifest
2024/12/02 11:12:38 DEBUG: Retrieving URLs from web adaptive formats
2024/12/02 11:13:08 DEBUG: audio1: HTTP Error for fragment 415: 403 Forbidden
2024/12/02 11:13:08 DEBUG: audio: Attempting to retrieve a new download URL
2024/12/02 11:13:09 DEBUG: Retrieving URLs from web DASH manifest
2024/12/02 11:13:09 DEBUG: Retrieving URLs from web adaptive formats
2024/12/02 11:13:38 DEBUG: audio1: HTTP Error for fragment 421: 403 Forbidden
2024/12/02 11:13:38 DEBUG: audio: Attempting to retrieve a new download URL
2024/12/02 11:13:41 DEBUG: Retrieving URLs from web DASH manifest
2024/12/02 11:13:41 DEBUG: Retrieving URLs from web adaptive formats
2024/12/02 11:14:08 DEBUG: audio1: HTTP Error for fragment 427: 403 Forbidden
2024/12/02 11:14:08 DEBUG: audio: Attempting to retrieve a new download URL
2024/12/02 11:14:11 DEBUG: Retrieving URLs from web DASH manifest
2024/12/02 11:14:11 DEBUG: Retrieving URLs from web adaptive formats
2024/12/02 11:14:41 DEBUG: video1: HTTP Error for fragment 432: 403 Forbidden
2024/12/02 11:14:41 DEBUG: video: Attempting to retrieve a new download URL
2024/12/02 11:14:43 DEBUG: Retrieving URLs from web DASH manifest
2024/12/02 11:14:43 DEBUG: Retrieving URLs from web adaptive formats
2024/12/02 11:15:13 DEBUG: audio1: HTTP Error for fragment 440: 403 Forbidden
2024/12/02 11:15:13 DEBUG: audio: Attempting to retrieve a new download URL
2024/12/02 11:15:14 DEBUG: Retrieving URLs from web DASH manifest
2024/12/02 11:15:14 DEBUG: Retrieving URLs from web adaptive formats
2024/12/02 11:15:43 DEBUG: audio1: HTTP Error for fragment 446: 403 Forbidden
2024/12/02 11:15:43 DEBUG: audio: Attempting to retrieve a new download URL
2024/12/02 11:15:44 DEBUG: Retrieving URLs from web DASH manifest
2024/12/02 11:15:44 DEBUG: Retrieving URLs from web adaptive formats
2024/12/02 11:16:13 DEBUG: audio1: HTTP Error for fragment 452: 403 Forbidden
2024/12/02 11:16:13 DEBUG: audio: Attempting to retrieve a new download URL
2024/12/02 11:16:13 DEBUG: Retrieving URLs from web DASH manifest
2024/12/02 11:16:14 DEBUG: Retrieving URLs from web adaptive formats
2024/12/02 11:16:43 DEBUG: audio1: HTTP Error for fragment 458: 403 Forbidden
2024/12/02 11:16:43 DEBUG: audio: Attempting to retrieve a new download URL
2024/12/02 11:16:43 DEBUG: Retrieving URLs from web DASH manifest
2024/12/02 11:16:44 DEBUG: Retrieving URLs from web adaptive formats
2024/12/02 11:17:13 DEBUG: audio1: HTTP Error for fragment 464: 403 Forbidden
2024/12/02 11:17:13 DEBUG: audio: Attempting to retrieve a new download URL
2024/12/02 11:17:13 DEBUG: Retrieving URLs from web DASH manifest
2024/12/02 11:17:14 DEBUG: Retrieving URLs from web adaptive formats
2024/12/02 11:17:43 DEBUG: audio1: HTTP Error for fragment 470: 403 Forbidden
2024/12/02 11:17:43 DEBUG: audio: Attempting to retrieve a new download URL
2024/12/02 11:17:43 DEBUG: Retrieving URLs from web DASH manifest
2024/12/02 11:17:44 DEBUG: Retrieving URLs from web adaptive formats
2024/12/02 11:18:13 DEBUG: audio1: HTTP Error for fragment 476: 403 Forbidden
2024/12/02 11:18:13 DEBUG: audio: Attempting to retrieve a new download URL
2024/12/02 11:18:14 DEBUG: Retrieving URLs from web DASH manifest
2024/12/02 11:18:14 DEBUG: Retrieving URLs from web adaptive formats
2024/12/02 11:18:43 DEBUG: audio1: HTTP Error for fragment 482: 403 Forbidden
2024/12/02 11:18:43 DEBUG: audio: Attempting to retrieve a new download URL
2024/12/02 11:18:43 DEBUG: Retrieving URLs from web DASH manifest
2024/12/02 11:18:44 DEBUG: Retrieving URLs from web adaptive formats
2024/12/02 11:19:13 DEBUG: video1: HTTP Error for fragment 486: 403 Forbidden
2024/12/02 11:19:13 DEBUG: video: Attempting to retrieve a new download URL
2024/12/02 11:19:14 DEBUG: Retrieving URLs from web DASH manifest
2024/12/02 11:19:14 DEBUG: Retrieving URLs from web adaptive formats
2024/12/02 11:19:43 DEBUG: audio1: HTTP Error for fragment 494: 403 Forbidden
2024/12/02 11:19:43 DEBUG: audio: Attempting to retrieve a new download URL
2024/12/02 11:19:43 DEBUG: Retrieving URLs from web DASH manifest
2024/12/02 11:19:43 DEBUG: Retrieving URLs from web adaptive formats
2024/12/02 11:20:13 DEBUG: audio1: HTTP Error for fragment 500: 403 Forbidden
2024/12/02 11:20:13 DEBUG: audio: Attempting to retrieve a new download URL
2024/12/02 11:20:13 DEBUG: Retrieving URLs from web DASH manifest
2024/12/02 11:20:13 DEBUG: Retrieving URLs from web adaptive formats
2024/12/02 11:20:43 DEBUG: audio1: HTTP Error for fragment 506: 403 Forbidden
2024/12/02 11:20:43 DEBUG: audio: Attempting to retrieve a new download URL
2024/12/02 11:20:44 WARNING: Video details no longer available mid download.
2024/12/02 11:20:44 WARNING: Stream was likely privated after finishing.
2024/12/02 11:20:44 WARNING: We will continue to download, but if it starts to fail, nothing can be done.
2024/12/02 11:20:44 ERROR: Video Details not found, video is likely private or does not exist.
2024/12/02 11:20:46 DEBUG: video1: Stream is finished and highest sequence reached
2024/12/02 11:20:46 DEBUG: video1: exiting
2024/12/02 11:20:46 DEBUG: video-download thread closing
2024/12/02 11:20:49 DEBUG: audio1: HTTP Error for fragment 506: 403 Forbidden
2024/12/02 11:20:49 DEBUG: audio: Attempting to retrieve a new download URL
2024/12/02 11:20:54 DEBUG: audio1: HTTP Error for fragment 506: 403 Forbidden
2024/12/02 11:20:54 DEBUG: audio: Attempting to retrieve a new download URL
2024/12/02 11:20:59 DEBUG: audio1: HTTP Error for fragment 506: 403 Forbidden
2024/12/02 11:20:59 DEBUG: audio: Attempting to retrieve a new download URL
2024/12/02 11:21:04 DEBUG: audio1: HTTP Error for fragment 506: 403 Forbidden
2024/12/02 11:21:04 DEBUG: audio: Attempting to retrieve a new download URL
2024/12/02 11:21:10 DEBUG: audio1: HTTP Error for fragment 506: 403 Forbidden
2024/12/02 11:21:10 DEBUG: audio: Attempting to retrieve a new download URL
2024/12/02 11:21:15 DEBUG: audio1: HTTP Error for fragment 506: 403 Forbidden
2024/12/02 11:21:15 DEBUG: audio: Attempting to retrieve a new download URL
2024/12/02 11:21:20 DEBUG: audio1: HTTP Error for fragment 506: 403 Forbidden
2024/12/02 11:21:20 DEBUG: audio: Attempting to retrieve a new download URL
2024/12/02 11:21:25 DEBUG: audio1: HTTP Error for fragment 506: 403 Forbidden
2024/12/02 11:21:25 DEBUG: audio: Attempting to retrieve a new download URL
2024/12/02 11:21:31 DEBUG: audio1: HTTP Error for fragment 506: 403 Forbidden
2024/12/02 11:21:31 DEBUG: audio: Attempting to retrieve a new download URL
2024/12/02 11:21:31 DEBUG: audio1: Fragment 506: 10/10 retries
2024/12/02 11:21:31 WARNING: audio1: Download link likely expired and stream is privated or members only, cannot continue download
2024/12/02 11:21:31 DEBUG: audio1: exiting
2024/12/02 11:21:31 DEBUG: audio-download thread closing
Video Fragments: 505; Audio Fragments: 506; Max Fragments: 504; Max Sequence: 504; Total Downloaded: 2.91GiB
2024/12/02 11:21:31 Download Finished
2024/12/02 11:21:31 INFO: Moving file D:\test\hhiU5ZK40oQ__4107813068\[A] PWE CS2 SHANGHAI MAJOR 2024 - OPENING STAGE - Day 3-hhiU5ZK40oQ.f140.ts to D:\test\[A] PWE CS2 SHANGHAI MAJOR 2024 - OPENING STAGE - Day 3-hhiU5ZK40oQ.f140.ts
2024/12/02 11:21:31 INFO: Moving file D:\test\hhiU5ZK40oQ__4107813068\[A] PWE CS2 SHANGHAI MAJOR 2024 - OPENING STAGE - Day 3-hhiU5ZK40oQ.f315.ts to D:\test\[A] PWE CS2 SHANGHAI MAJOR 2024 - OPENING STAGE - Day 3-hhiU5ZK40oQ.f315.ts
2024/12/02 11:21:31 INFO: Moving file D:\test\hhiU5ZK40oQ__4107813068\[A] PWE CS2 SHANGHAI MAJOR 2024 - OPENING STAGE - Day 3-hhiU5ZK40oQ.jpg to D:\test\[A] PWE CS2 SHANGHAI MAJOR 2024 - OPENING STAGE - Day 3-hhiU5ZK40oQ.jpg
2024/12/02 11:21:31 INFO: Moving file D:\test\hhiU5ZK40oQ__4107813068\[A] PWE CS2 SHANGHAI MAJOR 2024 - OPENING STAGE - Day 3-hhiU5ZK40oQ.ffmpeg.txt to D:\test\[A] PWE CS2 SHANGHAI MAJOR 2024 - OPENING STAGE - Day 3-hhiU5ZK40oQ.ffmpeg.txt

PixPin_2024-12-02_13-25-48

@nosoop
Copy link

nosoop commented Dec 8, 2024

See #221, in particular this comment. Currently requires building the dev branch.
Without a PO token (which will need to be generated through the proxied IP address) ytarchive will make constant player requests, which when done quickly enough will trigger what you're seeing.

@Kiritomo
Copy link
Author

Kiritomo commented Dec 11, 2024

@Kethsar @nosoop
I have updated ytarchive@dev and passed the potoken value to ytarchive, but the problem still occurs after about half an hour.
By the way, do I need to log in to youtube to get both the cookie and the potoken? I am not doing that now.

/root/go/bin/ytarchive --potoken MpQBe371kI9rx7x7RnLBeab4CsHueq74U71OlAeIn0W9Ouc2PAmIo1LfmiHKdmPkrrfe6louEoo0IgdXbh97PhkoCe0HovNRMZ4B3gs8DpHVmFWeIxkhyKFeTDG7JGY88UJ75MlmgpZqYueZwA9R3jl789f3bdIISBbbgTDJ9xJzhI3ISbY5CScEQjTdFfX4VS1Eq8eZFg== --wait --disable-save-state --write-thumbnail --mkv -o /root/upload/videos/zQV9vbMl-ag/zQV9vbMl-ag -c /root/upload/ytb_dl_cookies.txt --write-mux-file https://www.youtube.com/watch?v=zQV9vbMl-ag best
ytarchive 0.5.0
2024/12/11 14:34:07 Channel: MLBB eSports
2024/12/11 14:34:07 Video Title: 🔴 LIVE | MLBB M6 World Championship | Knockout Stage Day 4
2024/12/11 14:34:07 Selected quality: 1440p60 (VP9)
2024/12/11 14:34:07 Stream started at time 2024-12-11T02:14:59+00:00
2024/12/11 15:08:24 ERROR: Playability status: UNPLAYABLE.
2024/12/11 15:08:24 ERROR: Reason: Video niet beschikbaar
2024/12/11 15:08:24 ERROR: Logged in status: false
2024/12/11 15:08:24 ERROR: If this is a members only stream, you provided a cookies.txt file, and the above 'logged in' status is not True, please try updating your cookies file.
2024/12/11 15:08:24 WARNING: video1: Download link likely expired and stream is privated or members only, cannot continue download
2024/12/11 15:08:24 WARNING: audio1: Download link likely expired and stream is privated or members only, cannot continue download
Error opening input files: Invalid data found when processing input
2024/12/11 15:08:24 ERROR: Execute returned code 183. Something must have gone wrong with ffmpeg.
2024/12/11 15:08:24 ERROR: The .ts files will not be deleted in case the final file is broken.
2024/12/11 15:08:24 ERROR: Finally, the ffmpeg command was either written to a file or output above.

@Kethsar
Copy link
Owner

Kethsar commented Dec 11, 2024

@Kiritomo You use whatever cookies are linked to the po token. If you were logged out when grabbing the po token, you'd need to be logged out when grabbing cookies, and vice versa.
That said, it happening after 30 minutes makes me think your issue is not related. But I'd need to see if it's 403'ing every 30 seconds, which requires --debug

@Kiritomo
Copy link
Author

@Kiritomo You use whatever cookies are linked to the po token. If you were logged out when grabbing the po token, you'd need to be logged out when grabbing cookies, and vice versa. That said, it happening after 30 minutes makes me think your issue is not related. But I'd need to see if it's 403'ing every 30 seconds, which requires --debug

After passing cookies and potoken to ytarchive, this problem has been improved. potoken expires after about 29 hours.
However, if I need to record 24/7 livestream, how can I solve the problem of potoken expiration?
I think this may require adding the feature of automatically obtaining cookies and potokens by logging into a youtube account.

@Kiritomo
Copy link
Author

Kiritomo commented Dec 22, 2024

@Kethsar now a new problem occurs in the dev branch: HTTP Error for fragment 0: 403 Forbidden

root@kiritomo:~# /root/go/bin/ytarchive --potoken "MlKM4imf3QQrx4zZ5-KrNw9hxlaZWAhHn7BABHJSNwA_wx3OD7_eO2g_e8rFnCe2WVbAJ8XfVCn35ObljF48N2kR_OiK0YDJBk1RvuYtf-w2f76u" --debug --wait --disable-save-state --write-thumbnail --mkv -o "/root/upload/videos/gKXFsoYivpQ/gKXFsoYivpQ" -c /root/upload/ytb_dl_cookies.txt https://www.youtube.com/watch?v=gKXFsoYivpQ best 
ytarchive 0.5.0
2024/12/22 23:03:17 INFO: Loaded cookie file /root/upload/ytb_dl_cookies.txt
2024/12/22 23:03:18 Channel: ヤンジャン漫画TV【集英社ヤングジャンプ公式】
2024/12/22 23:03:18 Video Title: 【推しの子】コミックス完結記念ムービー「夢の舞台へ」
2024/12/22 23:03:18 DEBUG: Retrieving URLs from Web API DASH manifest
2024/12/22 23:03:18 DEBUG: Retrieving URLs from Web API adaptive formats
2024/12/22 23:03:18 DEBUG: Retrieving URLs from web DASH manifest
2024/12/22 23:03:18 DEBUG: Retrieving URLs from web adaptive formats
2024/12/22 23:03:18 Selected quality: 1080p (h264)
2024/12/22 23:03:18 Stream started at time 2024-12-22T15:00:06+00:00
2024/12/22 23:03:18 INFO: Starting download to /root/upload/videos/gKXFsoYivpQ/gKXFsoYivpQ__700496721/gKXFsoYivpQ.f140.ts
2024/12/22 23:03:18 INFO: Starting download to /root/upload/videos/gKXFsoYivpQ/gKXFsoYivpQ__700496721/gKXFsoYivpQ.f137.ts
2024/12/22 23:03:19 DEBUG: video1: HTTP Error for fragment 0: 403 Forbidden
2024/12/22 23:03:19 DEBUG: video: Attempting to retrieve a new download URL
2024/12/22 23:03:19 DEBUG: audio1: HTTP Error for fragment 0: 403 Forbidden
2024/12/22 23:03:19 DEBUG: audio: Attempting to retrieve a new download URL
2024/12/22 23:03:24 DEBUG: video1: HTTP Error for fragment 0: 403 Forbidden
2024/12/22 23:03:24 DEBUG: video: Attempting to retrieve a new download URL
2024/12/22 23:03:24 DEBUG: audio1: HTTP Error for fragment 0: 403 Forbidden
2024/12/22 23:03:24 DEBUG: audio: Attempting to retrieve a new download URL
2024/12/22 23:03:29 DEBUG: audio1: HTTP Error for fragment 0: 403 Forbidden
2024/12/22 23:03:29 DEBUG: audio: Attempting to retrieve a new download URL
2024/12/22 23:03:30 DEBUG: video1: HTTP Error for fragment 0: 403 Forbidden
2024/12/22 23:03:30 DEBUG: video: Attempting to retrieve a new download URL
2024/12/22 23:03:34 DEBUG: audio1: HTTP Error for fragment 0: 403 Forbidden
2024/12/22 23:03:34 DEBUG: audio: Attempting to retrieve a new download URL
2024/12/22 23:03:35 DEBUG: Retrieving URLs from Web API DASH manifest
2024/12/22 23:03:35 DEBUG: Retrieving URLs from Web API adaptive formats
2024/12/22 23:03:35 DEBUG: Retrieving URLs from web DASH manifest
2024/12/22 23:03:35 DEBUG: Retrieving URLs from web adaptive formats
2024/12/22 23:03:35 DEBUG: video1: HTTP Error for fragment 0: 403 Forbidden
2024/12/22 23:03:35 DEBUG: video: Attempting to retrieve a new download URL
2024/12/22 23:03:40 DEBUG: audio1: HTTP Error for fragment 0: 403 Forbidden
2024/12/22 23:03:40 DEBUG: audio: Attempting to retrieve a new download URL
2024/12/22 23:03:40 DEBUG: video1: HTTP Error for fragment 0: 403 Forbidden
2024/12/22 23:03:40 DEBUG: video: Attempting to retrieve a new download URL
2024/12/22 23:03:45 DEBUG: audio1: HTTP Error for fragment 0: 403 Forbidden
2024/12/22 23:03:45 DEBUG: audio: Attempting to retrieve a new download URL
2024/12/22 23:03:45 DEBUG: video1: HTTP Error for fragment 0: 403 Forbidden
2024/12/22 23:03:45 DEBUG: video: Attempting to retrieve a new download URL
^C
2024/12/22 23:03:47 WARNING: User Interrupt, Stopping download...
2024/12/22 23:03:50 DEBUG: audio1: exiting
2024/12/22 23:03:50 DEBUG: audio-download thread closing
2024/12/22 23:03:50 DEBUG: video1: exiting
2024/12/22 23:03:50 DEBUG: video-download thread closing


Download stopped prematurely. Would you like to merge the currently downloaded data? [y/N]: n

Would you like to save any created files? [y/N]: n
root@kiritomo:~# /root/upload/ytarchive --debug --wait --disable-save-state --write-thumbnail --mkv -o "/root/upload/videos/gKXFsoYivpQ/gKXFsoYivpQ" -c /root/upload/ytb_dl_cookies.txt https://www.youtube.com/watch?v=gKXFsoYivpQ best 
ytarchive 0.5.0
2024/12/22 23:05:02 INFO: Loaded cookie file /root/upload/ytb_dl_cookies.txt
2024/12/22 23:05:03 Channel: ヤンジャン漫画TV【集英社ヤングジャンプ公式】
2024/12/22 23:05:03 Video Title: 【推しの子】コミックス完結記念ムービー「夢の舞台へ」
2024/12/22 23:05:03 DEBUG: Error getting android player response: returned non-200 status code 400
2024/12/22 23:05:03 DEBUG: Retrieving URLs from web DASH manifest
2024/12/22 23:05:03 DEBUG: Retrieving URLs from web adaptive formats
2024/12/22 23:05:03 Selected quality: 1080p (h264)
2024/12/22 23:05:03 Stream started at time 2024-12-22T15:00:06+00:00
2024/12/22 23:05:03 INFO: Starting download to /root/upload/videos/gKXFsoYivpQ/gKXFsoYivpQ__1291667586/gKXFsoYivpQ.f140.ts
2024/12/22 23:05:03 INFO: Starting download to /root/upload/videos/gKXFsoYivpQ/gKXFsoYivpQ__1291667586/gKXFsoYivpQ.f137.ts
2024/12/22 23:05:33 DEBUG: video1: HTTP Error for fragment 53: 403 Forbidden
2024/12/22 23:05:33 DEBUG: video: Attempting to retrieve a new download URL
2024/12/22 23:05:33 DEBUG: Error getting android player response: returned non-200 status code 400
2024/12/22 23:05:33 DEBUG: Retrieving URLs from web DASH manifest
2024/12/22 23:05:33 DEBUG: Retrieving URLs from web adaptive formats
2024/12/22 23:06:04 DEBUG: audio1: HTTP Error for fragment 73: 403 Forbidden
2024/12/22 23:06:04 DEBUG: audio: Attempting to retrieve a new download URL
2024/12/22 23:06:04 DEBUG: video1: HTTP Error for fragment 73: 403 Forbidden
2024/12/22 23:06:04 DEBUG: Error getting android player response: returned non-200 status code 400
2024/12/22 23:06:04 DEBUG: Retrieving URLs from web DASH manifest
2024/12/22 23:06:10 DEBUG: Retrieving URLs from web adaptive formats
2024/12/22 23:06:35 DEBUG: video1: HTTP Error for fragment 79: 403 Forbidden
2024/12/22 23:06:35 DEBUG: video: Attempting to retrieve a new download URL
2024/12/22 23:06:35 DEBUG: audio1: HTTP Error for fragment 79: 403 Forbidden
2024/12/22 23:06:35 DEBUG: audio: Attempting to retrieve a new download URL
2024/12/22 23:06:40 DEBUG: video1: HTTP Error for fragment 79: 403 Forbidden
2024/12/22 23:06:40 DEBUG: video: Attempting to retrieve a new download URL
2024/12/22 23:06:40 DEBUG: audio1: HTTP Error for fragment 79: 403 Forbidden
2024/12/22 23:06:40 DEBUG: audio: Attempting to retrieve a new download URL
2024/12/22 23:06:45 DEBUG: video1: HTTP Error for fragment 79: 403 Forbidden
2024/12/22 23:06:45 DEBUG: video: Attempting to retrieve a new download URL
2024/12/22 23:06:45 DEBUG: audio1: HTTP Error for fragment 79: 403 Forbidden
2024/12/22 23:06:45 DEBUG: audio: Attempting to retrieve a new download URL
2024/12/22 23:06:51 DEBUG: video1: HTTP Error for fragment 79: 403 Forbidden
2024/12/22 23:06:51 DEBUG: video: Attempting to retrieve a new download URL
2024/12/22 23:06:51 DEBUG: audio1: HTTP Error for fragment 79: 403 Forbidden
2024/12/22 23:06:51 ERROR: https://www.youtube.com/watch?v=gKXFsoYivpQ is not a livestream. It would be better to use yt-dlp to download it.
2024/12/22 23:06:51 DEBUG: audio: Attempting to retrieve a new download URL
2024/12/22 23:06:56 DEBUG: audio1: HTTP Error for fragment 79: 403 Forbidden
2024/12/22 23:06:56 DEBUG: audio: Attempting to retrieve a new download URL
2024/12/22 23:06:56 DEBUG: video1: HTTP Error for fragment 79: 403 Forbidden
2024/12/22 23:06:56 DEBUG: video: Attempting to retrieve a new download URL
2024/12/22 23:07:01 DEBUG: audio1: HTTP Error for fragment 79: 403 Forbidden
2024/12/22 23:07:01 DEBUG: audio: Attempting to retrieve a new download URL
2024/12/22 23:07:01 DEBUG: video1: HTTP Error for fragment 79: 403 Forbidden
2024/12/22 23:07:01 DEBUG: video: Attempting to retrieve a new download URL
2024/12/22 23:07:07 DEBUG: audio1: HTTP Error for fragment 79: 403 Forbidden
2024/12/22 23:07:07 DEBUG: audio: Attempting to retrieve a new download URL
2024/12/22 23:07:07 DEBUG: video1: HTTP Error for fragment 79: 403 Forbidden
2024/12/22 23:07:07 ERROR: https://www.youtube.com/watch?v=gKXFsoYivpQ is not a livestream. It would be better to use yt-dlp to download it.
2024/12/22 23:07:07 DEBUG: video: Attempting to retrieve a new download URL
2024/12/22 23:07:12 DEBUG: audio1: HTTP Error for fragment 79: 403 Forbidden
2024/12/22 23:07:12 DEBUG: audio: Attempting to retrieve a new download URL
2024/12/22 23:07:12 DEBUG: video1: HTTP Error for fragment 79: 403 Forbidden
2024/12/22 23:07:12 DEBUG: video: Attempting to retrieve a new download URL
2024/12/22 23:07:17 DEBUG: video1: HTTP Error for fragment 79: 403 Forbidden
2024/12/22 23:07:17 DEBUG: video: Attempting to retrieve a new download URL
2024/12/22 23:07:17 DEBUG: audio1: HTTP Error for fragment 79: 403 Forbidden
2024/12/22 23:07:17 DEBUG: audio: Attempting to retrieve a new download URL
2024/12/22 23:07:22 DEBUG: audio1: HTTP Error for fragment 79: 403 Forbidden
2024/12/22 23:07:22 DEBUG: audio: Attempting to retrieve a new download URL
2024/12/22 23:07:22 DEBUG: video1: HTTP Error for fragment 79: 403 Forbidden
2024/12/22 23:07:23 ERROR: https://www.youtube.com/watch?v=gKXFsoYivpQ is not a livestream. It would be better to use yt-dlp to download it.
2024/12/22 23:07:23 DEBUG: audio1: Fragment 79: 10/10 retries
2024/12/22 23:07:23 WARNING: audio1: Download link has likely expired and the stream has probably finished processing.
2024/12/22 23:07:23 WARNING: audio1: You might want to use youtube-dl to download instead.
2024/12/22 23:07:23 DEBUG: video: Attempting to retrieve a new download URL
2024/12/22 23:07:23 DEBUG: video1: Fragment 79: 10/10 retries
2024/12/22 23:07:23 WARNING: video1: Download link has likely expired and the stream has probably finished processing.
2024/12/22 23:07:23 WARNING: video1: You might want to use youtube-dl to download instead.
2024/12/22 23:07:23 DEBUG: audio1: exiting
2024/12/22 23:07:23 DEBUG: video1: exiting
2024/12/22 23:07:23 DEBUG: video-download thread closing
2024/12/22 23:07:23 DEBUG: audio-download thread closing
Video Fragments: 79; Audio Fragments: 79; Max Fragments: 78; Max Sequence: 78; Total Downloaded: 33.93MiB
2024/12/22 23:07:23 Download Finished
2024/12/22 23:07:23 INFO: Moving file /root/upload/videos/gKXFsoYivpQ/gKXFsoYivpQ__1291667586/gKXFsoYivpQ.f140.ts to /root/upload/videos/gKXFsoYivpQ/gKXFsoYivpQ.f140.ts
2024/12/22 23:07:23 INFO: Moving file /root/upload/videos/gKXFsoYivpQ/gKXFsoYivpQ__1291667586/gKXFsoYivpQ.f137.ts to /root/upload/videos/gKXFsoYivpQ/gKXFsoYivpQ.f137.ts
2024/12/22 23:07:23 INFO: Moving file /root/upload/videos/gKXFsoYivpQ/gKXFsoYivpQ__1291667586/gKXFsoYivpQ.jpg to /root/upload/videos/gKXFsoYivpQ/gKXFsoYivpQ.jpg
2024/12/22 23:07:23 INFO: Moving file /root/upload/videos/gKXFsoYivpQ/gKXFsoYivpQ__1291667586/gKXFsoYivpQ.ffmpeg.txt to /root/upload/videos/gKXFsoYivpQ/gKXFsoYivpQ.ffmpeg.txt
2024/12/22 23:07:23 Muxing final file...
2024/12/22 23:07:23 DEBUG: Executing command: ffmpeg ffmpeg -hide_banner -nostdin -loglevel fatal -stats -seekable 0 -thread_queue_size 1024 -i /root/upload/videos/gKXFsoYivpQ/gKXFsoYivpQ.f140.ts -seekable 0 -thread_queue_size 1024 -i /root/upload/videos/gKXFsoYivpQ/gKXFsoYivpQ.f137.ts -c copy /root/upload/videos/gKXFsoYivpQ/gKXFsoYivpQ.mkv
frame=11836 fps=0.0 q=-1.0 Lsize=   34619KiB time=00:06:34.53 bitrate= 718.8kbits/s speed= 576x    
2024/12/22 23:07:24 INFO: Deleting file /root/upload/videos/gKXFsoYivpQ/gKXFsoYivpQ.ffmpeg.txt
2024/12/22 23:07:24 INFO: Deleting file /root/upload/videos/gKXFsoYivpQ/gKXFsoYivpQ.f140.ts
2024/12/22 23:07:24 INFO: Deleting file /root/upload/videos/gKXFsoYivpQ/gKXFsoYivpQ.f137.ts
2024/12/22 23:07:24 
Final file: /root/upload/videos/gKXFsoYivpQ/gKXFsoYivpQ.mkv

@Kethsar
Copy link
Owner

Kethsar commented Dec 22, 2024

@Kiritomo it means there's a mismatch between your cookies and the po token. I had that happen as well, my cookies were invalidated a week or so after I started using a po token. You'll need to re-export your cookies and grab a new po token that goes with those cookies.

@Kiritomo
Copy link
Author

Kiritomo commented Dec 23, 2024

@Kiritomo it means there's a mismatch between your cookies and the po token. I had that happen as well, my cookies were invalidated a week or so after I started using a po token. You'll need to re-export your cookies and grab a new po token that goes with those cookies.

But I got the cookies and potoken when I logged into YouTube through private browsing. OK, maybe I need to try again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants
@Kethsar @nosoop @Kiritomo and others