Skip to content

Commit

Permalink
Update shorts params
Browse files Browse the repository at this point in the history
  • Loading branch information
iBicha committed Mar 31, 2024
1 parent 99a5e9c commit 1a2d408
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/invidious/videos/parser.cr
Original file line number Diff line number Diff line change
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

0 comments on commit 1a2d408

Please sign in to comment.