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

10.4.0 ShortsLockupView not found! #743

Closed
4 tasks done
SohelKabir opened this issue Sep 2, 2024 · 17 comments · Fixed by #746
Closed
4 tasks done

10.4.0 ShortsLockupView not found! #743

SohelKabir opened this issue Sep 2, 2024 · 17 comments · Fixed by #746
Labels
bug Something isn't working

Comments

@SohelKabir
Copy link

SohelKabir commented Sep 2, 2024

Steps to reproduce

Install latest version and fetch shorts videos

const channel = await ytInstance.getChannel(channelId);
const shorts = await channel.getShorts();

Failure Logs

[YOUTUBEJS][Parser]: InnertubeError: ShortsLockupView not found!
This is a bug, want to help us fix it? Follow the instructions at https://github.com/LuanRT/YouTube.js/blob/main/docs/updating-the-parser.md or report it at https://github.com/LuanRT/YouTube.js/issues!
Introspected and JIT generated this class in the meantime:
class ShortsLockupView extends YTNode {
  static type = 'ShortsLockupView';

  entity_id: string;
  accessibility_text: string;
  thumbnail: {
    sources: {
      url: string,
      width: number,
      height: number
    }[]
  };
  on_tap: {
    innertube_command: NavigationEndpoint
  };
  menu_on_tap: {
    innertube_command: NavigationEndpoint
  };
  index_in_collection: number;
  menu_on_tap_a11y_label: string;
  overlay_metadata: {
    primary_text: {
      content: string
    },
    secondary_text: {
      content: string
    }
  };
  logging_directives: {
    tracking_params: string,
    visibility: {
      types: string
    },
    enable_displaylogger_experiment: boolean
  };

  constructor(data: RawNode) {
    super();
    this.entity_id = data.entityId;
    this.accessibility_text = data.accessibilityText;
    this.thumbnail = {
      sources: data.thumbnail.sources.map((item: any) => ({
        url: item.url,
        width: item.width,
        height: item.height
      }))
    };
    this.on_tap = {
      innertube_command: new NavigationEndpoint(data.onTap.innertubeCommand)
    };
    this.menu_on_tap = {
      innertube_command: new NavigationEndpoint(data.menuOnTap.innertubeCommand)
    };
    this.index_in_collection = data.indexInCollection;
    this.menu_on_tap_a11y_label = data.menuOnTapA11yLabel;
    this.overlay_metadata = {
      primary_text: {
        content: data.overlayMetadata.primaryText.content
      },
      secondary_text: {
        content: data.overlayMetadata.secondaryText.content
      }
    };
    this.logging_directives = {
      tracking_params: data.loggingDirectives.trackingParams,
      visibility: {
        types: data.loggingDirectives.visibility.types
      },
      enable_displaylogger_experiment: data.loggingDirectives.enableDisplayloggerExperiment
    };
  }
}

    at ERROR_HANDLER (/Volumes/Office/AlgeSoft/nexlev-extensions/nexlev-extension-backend/node_modules/.pnpm/[email protected]/node_modules/youtubei.js/src/parser/parser.ts:132:9)
    at createRuntimeClass (/Volumes/Office/AlgeSoft/nexlev-extensions/nexlev-extension-backend/node_modules/.pnpm/[email protected]/node_modules/youtubei.js/src/parser/generator.ts:409:3)
    at generateRuntimeClass (/Volumes/Office/AlgeSoft/nexlev-extensions/nexlev-extension-backend/node_modules/.pnpm/[email protected]/node_modules/youtubei.js/src/parser/generator.ts:476:19)
    at parseItem (/Volumes/Office/AlgeSoft/nexlev-extensions/nexlev-extension-backend/node_modules/.pnpm/[email protected]/node_modules/youtubei.js/src/parser/parser.ts:526:9)
    at Object.parseArray (/Volumes/Office/AlgeSoft/nexlev-extensions/nexlev-extension-backend/node_modules/.pnpm/[email protected]/node_modules/youtubei.js/src/parser/parser.ts:581:22)
    at ReelShelf (/Volumes/Office/AlgeSoft/nexlev-extensions/nexlev-extension-backend/node_modules/.pnpm/[email protected]/node_modules/youtubei.js/src/parser/classes/ReelShelf.ts:16:25)
    at parseItem (/Volumes/Office/AlgeSoft/nexlev-extensions/nexlev-extension-backend/node_modules/.pnpm/[email protected]/node_modules/youtubei.js/src/parser/parser.ts:550:22)
    at Object.parseArray (/Volumes/Office/AlgeSoft/nexlev-extensions/nexlev-extension-backend/node_modules/.pnpm/[email protected]/node_modules/youtubei.js/src/parser/parser.ts:581:22)
    at ItemSection (/Volumes/Office/AlgeSoft/nexlev-extensions/nexlev-extension-backend/node_modules/.pnpm/[email protected]/node_modules/youtubei.js/src/parser/classes/ItemSection.ts:19:28)
    at parseItem (/Volumes/Office/AlgeSoft/nexlev-extensions/nexlev-extension-backend/node_modules/.pnpm/[email protected]/node_modules/youtubei.js/src/parser/parser.ts:550:22) {
  date: 2024-09-02T14:24:35.343Z,
  version: '10.4.0'
}

Expected behavior

shorts videos

Current behavior

empty array

Version

Default

Anything else?

No response

Checklist

  • I am running the latest version.
  • I checked the documentation and found no answer.
  • I have searched the existing issues and made sure this is not a duplicate.
  • I have provided sufficient information.
@SohelKabir SohelKabir added the bug Something isn't working label Sep 2, 2024
@SohelKabir SohelKabir changed the title 10.4.0 10.4.0 ShortsLockupView not found! Sep 2, 2024
@whiskeycola
Copy link

whiskeycola commented Sep 6, 2024

Problem is also observed with shorts
[YOUTUBEJS][Parser]: InnertubeError: BadgeView not found! This is a bug, want to help us fix it? Follow the instructions at https://github.com/LuanRT/YouTube.js/blob/main/docs/u pdating-the-parser.md or report it at https://github.com/LuanRT/YouTube.js/issues! Introspected and JIT generated this class in the meantime: class BadgeView extends YTNode { static type = 'BadgeView'; ...

[YOUTUBEJS][Parser]: ShortsLockupView changed! The following keys where altered: badge The class has changed to: class ShortsLockupView extends YTNode { static type = 'ShortsLockupView'; ...

@hextor1

This comment has been minimized.

@hextor1

This comment has been minimized.

@absidue
Copy link
Collaborator

absidue commented Sep 10, 2024

@hextor1 You already commented on the pull request linked to this issue, so just take it from there and create a custom build of YouTube.js for yourself if you are too impatient to wait for it to be reviewed, merged and released.

@hextor1

This comment has been minimized.

@absidue
Copy link
Collaborator

absidue commented Sep 10, 2024

@hextor1 Unless you are actually missing information that you need, just ignore the message, you can also turn off logging in YouTube.js if you don't want to see warnings.

@hextor1

This comment has been minimized.

@hextor1

This comment has been minimized.

@retrouser955
Copy link

retrouser955 commented Sep 10, 2024

@hextor1

import { Log } from 'youtubei.js';
Log.setLevel(Log.Level.NONE);

Also please be patient as this is an open sourced project.

@sgebr01
Copy link

sgebr01 commented Sep 10, 2024

@hextor1 It's probably best to do it wherever you are running YouTubei.js and have created your InnerTube Instance.
Like this

import { Innertube, Log } from 'youtubei.js';

Innertube.create().then((yt) => {
     Log.setLevel(Log.Level.NONE);
     // Rest of your YouTube.js code here
})

@jason-hwang
Copy link

jason-hwang commented Sep 11, 2024

Hi guys, Are there any updates?

const channel = await ytInstance.getChannel(channelId);
const shorts = await channel.getShorts();

// shorts is empty

@hextor1

This comment was marked as off-topic.

@absidue
Copy link
Collaborator

absidue commented Sep 11, 2024

@jason-hwang Just be patient, YouTube.js is a project maintained by volunteers in their spare time. If you don't want to wait you can try the code in my pull request and create a custom build of YouTube.js for yourself, otherwise just be patient.

@hextor1

This comment has been minimized.

@jason-hwang
Copy link

Still waiting for update @jason-hwang

Thank you for your response. I didn't mean to be rude and ask for a version update, I just found this issue thread for the first time today and was curious about the progress. I appreciate your efforts 🙏

@absidue
Copy link
Collaborator

absidue commented Sep 11, 2024

@hextor1 Please stop spamming your messages all over this repo, either read the messages that people have sent to you and do what they say (people told you exactly how to turn off the log message) or be patient and wait for the pull request to be tested, reviewed, merged and released.

@hextor1
Copy link

hextor1 commented Sep 11, 2024

@hextor1 Please stop spamming your messages all over this repo, either read the messages that people have sent to you and do what they say (people told you exactly how to turn off the log message) or be patient and wait for the pull request to be tested, reviewed, merged and released.

@absidue OK and thank you so much

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants