Gimenz / insta-fetcher

simple instagram metadata scraping
https://www.npmjs.com/package/insta-fetcher
GNU General Public License v3.0
78 stars 36 forks source link

serverless functions compatibility #7

Closed pouryapb closed 2 years ago

pouryapb commented 2 years ago

6

Here you go. this should work. I wrote some lazy test codes that does not mean the code is 100% working 😄 . I'm sure you can write better tests later.

Gimenz commented 2 years ago

ah thanks for your PR, i'll review the code later. i'm too lazy for now haha.

pouryapb commented 2 years ago

now that I look again, I just needed to cover the constructor and this.setCookie() function. this.cookie.get() is just reading file and it shouldn't be a problem. why are you even storing it in a text file? I mean it's more convenient if it's in an environment variable.

Gimenz commented 2 years ago

ey bro, sorry if you waited too long. but can you delete test using mocha, i never use it haha.

Gimenz commented 2 years ago

now that I look again, I just needed to cover the constructor and this.setCookie() function. this.cookie.get() is just reading file and it shouldn't be a problem. why are you even storing it in a text file? I mean it's more convenient if it's in an environment variable.

I didn't think about it

Gimenz commented 2 years ago

sorry, i've fix it :D but thanks for making this library more better