LuanRT / YouTube.js

A wrapper around YouTube's internal API — reverse engineering InnerTube
https://www.npmjs.com/package/youtubei.js
MIT License
3.47k stars 219 forks source link

<10.1.0> <LOGIN_REQUIRED> #696

Closed nikunjgupta586 closed 1 month ago

nikunjgupta586 commented 1 month ago

Steps to reproduce

use getbasicinfo() for any of the youtube video with any of the server location. result throws "LOGIN_REQUIRED" for any of the youtube videos. we can't access any youtube video without login

Failure Logs

status: "LOGIN_REQUIRED"

Expected behavior

need it to be worked without account login

Current behavior

throwing "LOGIN_REQUIRED" for any of the youtube videos

Version

Default

Anything else?

No response

Checklist

LuanRT commented 1 month ago

Hi! Can you provide the full error message?

retrouser955 commented 1 month ago

I'm not entirely sure but this could be related. It seems mostly servers are getting these errors in an attempt to block off scrapers.

nikunjgupta586 commented 1 month ago

@LuanRT below is the response we are getting from getbasicinfo() function for any of the youtube video.

info -- VideoInfo { streaming_data: undefined, playability_status: { status: 'LOGIN_REQUIRED', reason: 'Sign in to confirm you’re not a bot', embeddable: false, audio_only_playablility: null, error_screen: PlayerErrorMessage { type: 'PlayerErrorMessage', subreason: [Text], reason: [Text], proceed_button: [Button], thumbnails: [Array], icon_type: 'ERROR_OUTLINE' } }, player_config: undefined, basic_info: { embed: null, channel: null, is_unlisted: undefined, is_family_safe: undefined, category: null, has_ypc_metadata: null, start_timestamp: null, end_timestamp: null, view_count: undefined, like_count: undefined, is_liked: undefined, is_disliked: undefined }, annotations: undefined, storyboards: undefined, endscreen: undefined, captions: undefined, cards: undefined }

retrouser955 commented 1 month ago

@LuanRT as I suspected, it is definitely because of the A/B testing YouTube is doing to prevent scrappers. They secured it on their server-side so even YouTube's clients are affected.

honzawashere commented 1 month ago

I bet this is just that page that pops up usually on servers or suspicious clients saying "Please sign in to verify you are not a bot" or something like that. just use auth as shown in examples of this repository and you should be good to go

unixfox commented 1 month ago

Related: https://github.com/LuanRT/YouTube.js/issues/674