DrKain / scrape-youtube

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

search is not a function #50

Closed Skidamek closed 2 years ago

Skidamek commented 2 years ago

In lastest (2.1.10) version "search" function not working, when i install earlier version (2.1.9) it work

Skidamek commented 2 years ago

I using discord.js in version 13.2.0, javascript and node.js in version 16.13.0

DrKain commented 2 years ago

Please fill in the issue template properly, then I can take a look at the issue

DrKain commented 2 years ago

Considering the only change between those version was the removal of the default import, you probably need to change

const youtube = require('scrape-youtube').default;

to

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

oh it work, thx

DrKain commented 2 years ago

Because this is getting confusing for people, from 2.1.11 and up you can just use

import { youtube } from 'scrape-youtube';
// or 
const youtube = require('scrape-youtube');