-
Notifications
You must be signed in to change notification settings - Fork 10
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
get videoInfo
from url link
#10
Comments
Could you give a small example of your code? I don't seem to understand the issue at hand. In the image it shows a list of found track titles but then when you select a track the title is undefined? |
That quite fast response, here is the line https://github.com/Ayeven/generic-bot/blob/c87589523aefc7b87c0a95959b51239285b89698/base/track.js#L86 which I can't extract info from url link. I console log it, return empty array. The music is correctly playing the right track, but title become undefined since empty array. This is the full repo link : https://github.com/Ayeven/generic-bot |
This is expected behavior as this Scraper just replicates the search from YouTube and parses the response data, if you were to fill in an URL in YouTube search it might return the expected video or it might not... const { Scraper } = require('@yimura/scraper');
const ytsr = new Scraper();
ytsr.search("keywords"); If YouTube doesn't return data for a link then we can't parse it, your code also seems incorrect as the return object for Scraper#search() is vastly different and doesn't contain the title property. Example Return Object: {
channels: [
{ ... }
],
playlists: [
{ ... }
],
streams: [
{ ... }
],
videos: [
{
description: String,
duration: Number,
uploaded: String,
views: Number,
channel: {
name: String,
link: String,
verified: Boolean
},
id: String,
link: String,
thumbnail: String,
title: String,
shareLink: String
}
]
} |
|
This inconsistency comes down to YouTube themselves. I'm unable to reproduce your issue, seems to do what it is supposed to... |
|
Is your feature request related to a problem? Please describe.
This package is fast in searching youtube videos, and should state in the documentation the limit it search. As I wanted to get video info from the link, sometime the title return undefined, thus forcing me to make it
Unknown Track
.Describe the solution you'd like
Get video info at least
title
from the provided link parameterDescribe alternatives you've considered
No idea
Additional context
image
The text was updated successfully, but these errors were encountered: