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

Upgrade youtube package to fix 403 errors #1370

Merged
merged 1 commit into from
Jul 8, 2024

Conversation

gouarfig
Copy link

@gouarfig gouarfig commented Jul 5, 2024

Upgrade youtube package to fix 403 errors

Fixes #1364, #1359, and probably plenty others not written in English 😆


Current version

% lux "https://www.youtube.com/watch?v=yE5Tpp2BSGw"

 Site:      YouTube youtube.com
 Title:     19. Rob Pike - What We Got Right, What We Got Wrong | GopherConAU 2023
 Type:      video
 Stream:
     [137]  -------------------
     Quality:         1080p video/mp4; codecs="avc1.640028"
     Size:            260.77 MiB (273438222 Bytes)
     # download with: lux -f 137 ...

0 B / 260.77 MiB [-------------------------------------------------------------------------------------------------------------------------------] ? p/s 0.00% ?Downloading https://www.youtube.com/watch?v=yE5Tpp2BSGw error:
https://rr1---sn-u5a3u5a3-h5oez.googlevideo.com/videoplayback?bui=AXc671KncqAVCTyAa6fPlQSOmxpgdvXdpM0xKgnocwrBRNgDUkpA3_SeFn9Hu-OqOTdJF5_w8toMS7CK&c=WEB&clen=45977005&dur=2840.868&ei=E1iJZpHRCpjDmLAP_-GIwAE&expire=1720298611&fvip=4&gir=yes&id=o-AJiTezBHJtmmore1S3mzHuqbuYHMzv33jdYxgj4Q9_L6&initcwndbps=1560000&ip=92.7.81.47&itag=140&keepalive=yes&lmt=1704424075521713&lsig=AHlkHjAwRQIgSNx-h2uSgz0R6jZWmPr9pzun-SruuLhnVZI572X0G34CIQCMFOZMh6KwAUw86dIGKYu1DdPWxG3VHVK4IikneHE08Q%3D%3D&lsparams=mh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpl%2Cinitcwndbps&mh=65&mime=audio%2Fmp4&mm=31%2C29&mn=sn-u5a3u5a3-h5oez%2Csn-aigzrn7l&ms=au%2Crdu&mt=1720276649&mv=m&mvi=1&n=Y0WvKxUu-uRigZocFJX&ns=D9lwiy_keIn2zyHJPHQosgYQ&pl=20&requiressl=yes&rqh=1&sefc=1&sig=AJfQdSswRQIgWxM19XavNqvEoOdcx6PMQvxY350txkoC8PqfCyK9IFcCIQCjCkwFtNZaJBotExQDTiqarMNGbHrtkYf_6P4IvSmUWA%3D%3D&source=youtube&sparams=expire%2Cei%2Cip%2Cid%2Citag%2Csource%2Crequiressl%2Cxpc%2Cbui%2Cspc%2Cvprv%2Csvpuc%2Cmime%2Cns%2Crqh%2Cgir%2Cclen%2Cdur%2Clmt&spc=NO7bAc6bmgXDK2TAuaPS6mzo0e2IFnrA7MHh0AdLI2Pfs0X_gBtluw72g8sW&svpuc=1&txp=5432434&vprv=1&xpc=EgVo2aDSNQ%3D%3D request error: HTTP 403
github.com/iawia002/lux/request.Request
	github.com/iawia002/lux/request/request.go:116
github.com/iawia002/lux/downloader.(*Downloader).writeFile
	github.com/iawia002/lux/downloader/downloader.go:110
github.com/iawia002/lux/downloader.(*Downloader).save
	github.com/iawia002/lux/downloader/downloader.go:194
github.com/iawia002/lux/downloader.(*Downloader).Download.func1
	github.com/iawia002/lux/downloader/downloader.go:675
runtime.goexit
	runtime/asm_amd64.s:1695
github.com/iawia002/lux/request.Request
	github.com/iawia002/lux/request/request.go:118
github.com/iawia002/lux/downloader.(*Downloader).writeFile
	github.com/iawia002/lux/downloader/downloader.go:110
github.com/iawia002/lux/downloader.(*Downloader).save
	github.com/iawia002/lux/downloader/downloader.go:194
github.com/iawia002/lux/downloader.(*Downloader).Download.func1
	github.com/iawia002/lux/downloader/downloader.go:675
runtime.goexit
	runtime/asm_amd64.s:1695
%

Fixed version

% ~/go/bin/lux "https://www.youtube.com/watch?v=yE5Tpp2BSGw"

 Site:      YouTube youtube.com
 Title:     19. Rob Pike - What We Got Right, What We Got Wrong | GopherConAU 2023
 Type:      video
 Stream:
     [137]  -------------------
     Quality:         1080p video/mp4; codecs="avc1.640028"
     Size:            260.77 MiB (273438222 Bytes)
     # download with: lux -f 137 ...

260.77 MiB / 260.77 MiB [===========================================================================================================] 2.36 MiB p/s 100.00% 1m51s
Merging video parts into 19. Rob Pike - What We Got Right, What We Got Wrong - GopherConAU 2023.mp4
%

@Ada-lave
Copy link

Ada-lave commented Jul 7, 2024

Yep, i update and this works, thanks you

Copy link
Owner

@iawia002 iawia002 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@iawia002 iawia002 merged commit 0883b0f into iawia002:master Jul 8, 2024
27 of 29 checks passed
@gouarfig gouarfig deleted the fix-for-youtube-403-errors branch July 8, 2024 18:33
@cooloola
Copy link

Yep, i update and this works, thanks you

How did you upgrade?

@SamBecca16
Copy link

how can I upgrade?

@gouarfig
Copy link
Author

gouarfig commented Aug 7, 2024

You can upgrade by compiling from source.

This is not actually complicated

  1. you need to install the go toolkit at https://go.dev/dl/
  2. then just run this command: go install github.com/iawia002/lux@latest and the new binary will be installed in your home directory at go/bin

@Lao-Shen
Copy link

Lao-Shen commented Aug 29, 2024

After go install github.com/iawia002/lux@latest, the same error still occurs

$ HTTPS_PROXY="http://127.0.0.1:10809" lux "https://www.youtube.com/shorts/f_-AhpYJh_k"

 Site:      YouTube youtube.com
 Title:     Gotta reload to keep shooting [Compilation PART 64]
 Type:      video
 Stream:
     [299]  -------------------
     Quality:         1080p60 video/mp4; codecs="avc1.64002a"
     Size:            11.37 MiB (11921906 Bytes)
     # download with: lux -f 299 ...

0 B / 11.37 MiB [-----------------------------------------------------------------------------------------------------------------------] ? p/s 0.00% ?Downloading https://www.youtube.com/shorts/f_-AhpYJh_k error:
https://rr1---sn-a5mekndz.googlevideo.com/videoplayback?bui=AQmm2exYhJqkGEoP6LG9aPWFAD5Z_JyQH68sWiKmzq-XoRvHVlKKTG8XRrd2QVs62HomfkQzlKmjuykp&c=WEB&clen=269768&dur=16.602&ei=ex3QZuC7MMPisfIPvoC60AY&expire=1724936667&fvip=5&gir=yes&id=o-AF1YnLHz5kcZeGzcYrX3GCrY81RDMxMWaAT7jFZHhb0E&initcwndbps=1352500&ip=148.135.126.196&itag=140&keepalive=yes&lmt=1713002471207685&lsig=AGtxev0wRQIhAP_hAZD_H3TDhiK2dW168slmWlslh7ke13sOHUYXFbkPAiAzd4XbVaCfMlvykVnw_tAvvQYXo-v1ncxg0LyuZhyeWg%3D%3D&lsparams=mh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpl%2Cinitcwndbps&mh=om&mime=audio%2Fmp4&mm=31%2C29&mn=sn-a5mekndz%2Csn-a5msenes&ms=au%2Crdu&mt=1724914637&mv=m&mvi=1&n=YtjixpWn8sLHytRzuK&ns=84AOnr0_vAv5YMuIDSuoIUsQ&pl=17&requiressl=yes&rqh=1&sefc=1&sig=AJfQdSswRgIhALlVxS_6xIxMjT4gd6a3jTrAXYPoIlhE718MXikgwwirAiEArsAUWyjTiC9fX9vq1d1FZG2MmMRqwMJJFzOL2Io184w%3D&source=youtube&sparams=expire%2Cei%2Cip%2Cid%2Citag%2Csource%2Crequiressl%2Cxpc%2Cbui%2Cspc%2Cvprv%2Csvpuc%2Cxtags%2Cmime%2Cns%2Crqh%2Cgir%2Cclen%2Cdur%2Clmt&spc=Mv1m9p6f64JyspQfHEgHQDsrG9O4VQfUYzdToKG-iTcTp5xvOQ8fhJ57hkFY&svpuc=1&txp=5532434&vprv=1&xpc=EgVo2aDSNQ%3D%3D&xtags=drc%3D1 request error: HTTP 403
github.com/iawia002/lux/request.Request
        C:/Users/Administrator/go/pkg/mod/github.com/iawia002/[email protected]/request/request.go:116
github.com/iawia002/lux/downloader.(*Downloader).writeFile
        C:/Users/Administrator/go/pkg/mod/github.com/iawia002/[email protected]/downloader/downloader.go:110
github.com/iawia002/lux/downloader.(*Downloader).save
        C:/Users/Administrator/go/pkg/mod/github.com/iawia002/[email protected]/downloader/downloader.go:194
github.com/iawia002/lux/downloader.(*Downloader).Download.func1
        C:/Users/Administrator/go/pkg/mod/github.com/iawia002/[email protected]/downloader/downloader.go:675
runtime.goexit
        C:/go/src/runtime/asm_amd64.s:1695
github.com/iawia002/lux/request.Request
        C:/Users/Administrator/go/pkg/mod/github.com/iawia002/[email protected]/request/request.go:118
github.com/iawia002/lux/downloader.(*Downloader).writeFile
        C:/Users/Administrator/go/pkg/mod/github.com/iawia002/[email protected]/downloader/downloader.go:110
github.com/iawia002/lux/downloader.(*Downloader).save
        C:/Users/Administrator/go/pkg/mod/github.com/iawia002/[email protected]/downloader/downloader.go:194
github.com/iawia002/lux/downloader.(*Downloader).Download.func1
        C:/Users/Administrator/go/pkg/mod/github.com/iawia002/[email protected]/downloader/downloader.go:675
runtime.goexit
        C:/go/src/runtime/asm_amd64.s:1695


@qinkangwu
Copy link

@Lao-Shen same error

@PRO-2684
Copy link

PRO-2684 commented Oct 9, 2024

For anyone who don't want to compile, you can visit the Actions panel and download latest ci from Builder workflow.

@Spring2022abcjk
Copy link

i use the go install github.com/iawia002/lux@latest but the same error(403)

` Site: YouTube youtube.com
Title: [Driver's View] Splashes of Colour on the Azalea-CL
Type: video
Stream:
[299] -------------------
Quality: 1080p60 video/mp4; codecs="avc1.64002a"
Size: 694.01 MiB (727720579 Bytes)
# download with: lux -f 299 ...

0 B / 694.01 MiB [--------------------------------------------------------------------------------------] ? p/s 0.00% ?Downloading https://youtu.be/v2Ffr3eU5lg?si=L5XUJ7Oqj7KIazWv error:
https://rr3---sn-i3b7knzl.googlevideo.com/videoplayback?aitags=133%2C134%2C135%2C136%2C160%2C242%2C243%2C244%2C247%2C278%2C298%2C299%2C302%2C303%2C308%2C315&bui=AXLXGFRoM3tmjAPEk29Wjpd_G6Te8z0N9LLywj9UYAjJ3EU5oOOBQL6DV9f35DcK7pLOk2QRy8BTFvpz&c=WEB&clen=708857438&dur=1165.466&ei=v5sGZ-juDYuy2roPr872qQM&expire=1728507935&fexp=51300760&fvip=2&gir=yes&id=o-AH77Vx7qjufAbR3wCh_pLnfJFkQGHIu5YnwTGEH-TLBE&initcwndbps=1608750&ip=103.151.172.24&itag=299&keepalive=yes&lmt=1726367821323969&lsig=ACJ0pHgwRgIhAISOVQm-NgaSKrTEf1D3ITw8oXFXd0cyxYMcO1iCDXPHAiEAkkKEcnQwFhSk96NMTHCF49LFIMUS-1qoFzgwAV5wFSU%3D&lsparams=met%2Cmh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpl%2Crms%2Cinitcwndbps&met=1728486335%2C&mh=bT&mime=video%2Fmp4&mm=31%2C26&mn=sn-i3b7knzl%2Csn-un57enez&ms=au%2Conr&mt=1728485834&mv=m&mvi=3&n=C8hSd1H67ngIBIrfI&ns=ihS1vlfL4LqGlpsZq2aihiIQ&pl=24&requiressl=yes&rms=au%2Cau&rqh=1&sefc=1&sig=AJfQdSswRQIhAMKcadgBHASsSE6kFToIzb8Lb2M_vN-NlHei0MaXYezLAiAOEfsLWJ4ExrTtqq65Oh_qUddVJjAg3OCbixSu35FM9A%3D%3D&source=youtube&sparams=expire%2Cei%2Cip%2Cid%2Caitags%2Csource%2Crequiressl%2Cxpc%2Cbui%2Cspc%2Cvprv%2Csvpuc%2Cmime%2Cns%2Crqh%2Cgir%2Cclen%2Cdur%2Clmt&spc=54MbxfMb6dJS5uHD5-PR83J4rZIflp9O_M_q8NGKKYi8ZoVnKjkcypI-4Q&svpuc=1&txp=6309224&vprv=1&xpc=EgVo2aDSNQ%3D%3D request error: HTTP 403
github.com/iawia002/lux/request.Request
C:/Users/petal/go/pkg/mod/github.com/iawia002/[email protected]/request/request.go:116
github.com/iawia002/lux/downloader.(*Downloader).writeFile
C:/Users/petal/go/pkg/mod/github.com/iawia002/[email protected]/downloader/downloader.go:110
github.com/iawia002/lux/downloader.(*Downloader).save
C:/Users/petal/go/pkg/mod/github.com/iawia002/[email protected]/downloader/downloader.go:194
github.com/iawia002/lux/downloader.(*Downloader).Download.func1
C:/Users/petal/go/pkg/mod/github.com/iawia002/[email protected]/downloader/downloader.go:675
runtime.goexit
C:/Program Files/Go/src/runtime/asm_amd64.s:1700
github.com/iawia002/lux/request.Request
C:/Users/petal/go/pkg/mod/github.com/iawia002/[email protected]/request/request.go:118
github.com/iawia002/lux/downloader.(*Downloader).writeFile
C:/Users/petal/go/pkg/mod/github.com/iawia002/[email protected]/downloader/downloader.go:110
github.com/iawia002/lux/downloader.(*Downloader).save
C:/Users/petal/go/pkg/mod/github.com/iawia002/[email protected]/downloader/downloader.go:194
github.com/iawia002/lux/downloader.(*Downloader).Download.func1
C:/Users/petal/go/pkg/mod/github.com/iawia002/[email protected]/downloader/downloader.go:675
runtime.goexit
C:/Program Files/Go/src/runtime/asm_amd64.s:1700
`

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

Successfully merging this pull request may close these issues.

[download fail]: Youtube
10 participants