Skip to content

Commit

Permalink
Update workaround used to fetch streaming URLs (#4552)
Browse files Browse the repository at this point in the history
Thanks to LuanRT (From youtube.js) for the fix!

Closes issue 4498
  • Loading branch information
SamantazFox committed Mar 31, 2024
2 parents 99a5e9c + 1a2d408 commit 08390ac
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/invidious/videos/parser.cr
Expand Up @@ -142,8 +142,9 @@ end

def try_fetch_streaming_data(id : String, client_config : YoutubeAPI::ClientConfig) : Hash(String, JSON::Any)?
LOGGER.debug("try_fetch_streaming_data: [#{id}] Using #{client_config.client_type} client.")
# 2AMBCgIQBg is a workaround for streaming URLs that returns a 403.
response = YoutubeAPI.player(video_id: id, params: "2AMBCgIQBg", client_config: client_config)
# CgIIAdgDAQ%3D%3D is a workaround for streaming URLs that returns a 403.
# https://github.com/LuanRT/YouTube.js/pull/624
response = YoutubeAPI.player(video_id: id, params: "CgIIAdgDAQ%3D%3D", client_config: client_config)

playability_status = response["playabilityStatus"]["status"]
LOGGER.debug("try_fetch_streaming_data: [#{id}] Got playabilityStatus == #{playability_status}.")
Expand Down

2 comments on commit 08390ac

@wanniethecharacter
Copy link

Choose a reason for hiding this comment

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

yay

@nirvgorilla
Copy link

@nirvgorilla nirvgorilla commented on 08390ac Apr 3, 2024

Choose a reason for hiding this comment

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

I don't understand. I updated and still no video works for me on my invidious instance. I'm not sure what else to do. I've reboot the entire machine, I've tried updating again. Is there cache I have to delete somewhere or something?

I tried rebuilding by going into the invidious updater -> 6 -> 4 (rebuild) -> and it says this

-- Rebuilding /home/invidious/invidious
./invidious_update: line 1150: shards: command not found
./invidious_update: line 1151: crystal: command not found
/usr/bin

On the bottom it says Current version: 2024.02.19-e8a36985 @ master
Even though I updated and it says I'm already up to date.

Should I try uninstalling/reinstalling? I never did it before. I guess I fear losing all my settings/subscriptions.

Edit: haha I have NO idea how crystal/shards uninstalled itself. What do you suppose I do? I don't want to reinstall because it wipes everything out.

Edit 2: Nevermind. I just tested and I can apt install crystal, rebuild, restart, and it works. I don't know how crystal was uninstalled.

Please sign in to comment.