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

Allow providing video url directly #11

Open
GeopJr opened this issue Jul 6, 2021 · 1 comment
Open

Allow providing video url directly #11

GeopJr opened this issue Jul 6, 2021 · 1 comment

Comments

@GeopJr
Copy link
Contributor

GeopJr commented Jul 6, 2021

Is your feature request related to a problem? Please describe.
According to #10 searching by providing a url is not always consistent. Custom search solutions could also benefit from scraper's speed.

Describe the solution you'd like
A _fetch param that will use the query directly as the request URL and a function to wrap it up (because search is misleading).

Describe alternatives you've considered
Calling the functions directly, however it feels redundant as it will be exactly the same as search but will require manually GETting page.

Additional context
While search kinda works when you provide a url, it might not be on-par depending on language, video age rating, location etc.

@KevinModernel
Copy link

Hi people!

Is your feature request related to a problem? Please describe.
I'm trying to scrape some video ids for a chrome extension. When making a "proof of concept" in the back with Node, it´s works perfect. But the problem comes when I use webpack to bundle the actual file.
The error arises at this line: let results = await yt.search(recommendation);
I get the error: TypeError: The "listener" argument must be of type Function. Received type object.

Describe the solution you'd like
I'm looking to get the same result that I get when running it with node, that is the output like the one in the readme file. Since my problem I'm getting results = undefined

Describe alternatives you've considered
I've tried working with CJS and ESM, async/await and .then(),

Thank you very much! Besides my implementation problem, this scraper is great!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants