DrKain / scrape-youtube

A lightning fast package to scrape YouTube search results
MIT License
112 stars 30 forks source link

TypeError when using exported search function #51

Closed CosmosisT closed 2 years ago

CosmosisT commented 2 years ago
const youtube = require('scrape-youtube');

Perhaps obvious but youtube.search is no longer a function this way; any means of updating the example to help others understand I do enjoy this quite a bit! :)

const youtube = require('scrape-youtube').youtube;
youtube.search("hello-world").then((results) => {
    console.log(results);
});
DrKain commented 2 years ago

Thanks for reporting. This was a mistake in the code, the example should work fine in 2.1.13

CosmosisT commented 2 years ago

Perfect! Was just updating and noticed that immediately, works like a charm. :)