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

Twitch URL structure #32

Closed
ahmedtds opened this issue Sep 3, 2020 · 7 comments
Closed

Twitch URL structure #32

ahmedtds opened this issue Sep 3, 2020 · 7 comments
Labels
question Further information is requested

Comments

@ahmedtds
Copy link

ahmedtds commented Sep 3, 2020

First, thanks for this initiative

Can you merge one of these PRs please?
ytdl-org#25010
ytdl-org#21812

They aim to solve same issue, since the previous one (21812) were never merged for more than a year, there was a new PR by someone else (25010) but that's not merged for months as well

Thanks

@ahmedtds ahmedtds added the question Further information is requested label Sep 3, 2020
@ahmedtds
Copy link
Author

ahmedtds commented Sep 3, 2020

These were relevant issues:
ytdl-org#24263
ytdl-org#21811

Both issues are for same problem, one of them should have been closed as duplicate

@blackjack4494
Copy link
Owner

@ahmedtds sure will have a look.
I already merged some twitch related PR #8
which fixes new api call

pre patch

theidel@DESKTOP-S2JEM09:/mnt/c/Users/Tom-Oliver Heidel$ youtube-dl http://www.twitch.tv/vanillatv/profile -F
[twitch:profile] vanillatv: Downloading channel info JSON
ERROR: twitch:profile returned error: Bad Request - Channel identifier "vanillatv" is in an invalid format

patched

theidel@DESKTOP-S2JEM09:/mnt/c/Users/Tom-Oliver Heidel$ youtube-dlc http://www.twitch.tv/vanillatv/profile -F
[twitch:profile] vanillatv: Downloading channel info JSON
[twitch:profile] 22744919: Downloading profile JSON page 1
[twitch:profile] 22744919: Downloading profile JSON page 2
[twitch:profile] 22744919: Downloading profile JSON page 3
[twitch:profile] 22744919: Downloading profile JSON page 4
[twitch:profile] 22744919: Downloading profile JSON page 5
[twitch:profile] 22744919: Downloading profile JSON page 6
[download] Downloading playlist: VanillaTV
[twitch:profile] playlist VanillaTV: Collected 412 video ids (downloading 412 of them)
[download] Downloading video 1 of 412
[twitch:vod] 49155755: Downloading vod info JSON
[twitch:vod] 49155755: Downloading vod access token
[twitch:vod] 49155755: Downloading m3u8 information
[info] Available formats for v49155755:
format code extension resolution note
Audio_Only mp4 audio only 3800k , mp4a.40.2
Source mp4 1280x720 3800k , avc1.4D4029, mp4a.40.2 (best)
[download] Downloading video 2 of 412

will have a look at those other ones. But seems they will work :)

@blackjack4494
Copy link
Owner

@ahmedtds got merged with #34
will be released within the next few minutes.

@ahmedtds
Copy link
Author

ahmedtds commented Sep 5, 2020

@blackjack4494 Thank you so much, tried it, works great.

I want to ask feedback of @vxbinaca as well because of this:

Now after this fix new twitch urls like https://www.twitch.tv/x/videos?filter=archives&sort=time works correctly but old structure like https://twitch.tv/x/videos/past-broadcasts doesn't work anymore. It's not possible to get an URL like "videos/past-broadcasts" from twitch website anymore so it should be OK but wanted to ask @vxbinaca if it does break any of their scripts? Can you comment on this? Maybe you have scripts that passes URL like https://twitch.tv/x/videos/past-broadcasts I don't know. Just wanted to make sure my PR merge request didn't cause any malfunction.

@vxbinaca
Copy link

vxbinaca commented Sep 5, 2020

@blackjack4494 Thank you so much, tried it, works great.

I want to ask feedback of @vxbinaca as well because of this:

Now after this fix new twitch urls like https://www.twitch.tv/x/videos?filter=archives&sort=time works correctly but old structure like https://twitch.tv/x/videos/past-broadcasts doesn't work anymore. It's not possible to get an URL like "videos/past-broadcasts" from twitch website anymore so it should be OK but wanted to ask @vxbinaca if it does break any of their scripts? Can you comment on this? Maybe you have scripts that passes URL like https://twitch.tv/x/videos/past-broadcasts I don't know. Just wanted to make sure my PR merge request didn't cause any malfunction.

Firstly, thank you for tagging me.

So I can test this once we adapt my tool that mirrors videos and repoint it's library calls to this script instead of YTDL. Thats easy one of the other guys who maintain it can do that I might even be able to do it even though I'm not a programmer. As long as the maintainers don't stray too far from YTDL library calls I should be good.

What the issue I have is my ripping batch files are channel based, so when channels in a site stop working it's not a good thing.

Pending a library call switch and string replacing URLs in my batch files I'm calling this one fixed. If channels extract I'm good thats all I need the other issues are surrmountable.

@blackjack4494
Copy link
Owner

I noticed there are more filters
featured
clips but got clips as endpoint and not videos
collections
past_premieres

Also I tried some endpoints on live streaming users. Problem here is that twitch adds the live stream to the videos (in some categories like featured). So archiving someone who is streaming live will be an issue depending on the endpoint. There would be some workaround that you could check first if the streamer is online and streaming so you would skip the first video in those categories where the live stream is added.

I randomly clicked on some streamer just to showcase
image

But the weird part is that this won't happen on every streamer. Another bug is that it sometimes just shows one video and won't look for more.

@vxbinaca
Copy link

vxbinaca commented Sep 6, 2020

I noticed there are more filters
featured
clips but got clips as endpoint and not videos
collections
past_premieres

Also I tried some endpoints on live streaming users. Problem here is that twitch adds the live stream to the videos (in some categories like featured). So archiving someone who is streaming live will be an issue depending on the endpoint. There would be some workaround that you could check first if the streamer is online and streaming so you would skip the first video in those categories where the live stream is added.

I randomly clicked on some streamer just to showcase
image

But the weird part is that this won't happen on every streamer. Another bug is that it sometimes just shows one video and won't look for more.

The solution is to use the 'check if life' flag who's proper name escapes me right now. It will skip that live broadcast. This is default with extractors like YouTube but not Twitch. We want to implement that flag into Tubeup.

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

No branches or pull requests

3 participants