PrinceKomali / twitter-url

2 stars 0 forks source link

code error #2

Open Stalker-moment opened 1 year ago

Stalker-moment commented 1 year ago
            let videos = data.globalObjects.tweets[id].extended_entities.media[0].video_info;
                                            ^

TypeError: Cannot read properties of undefined (reading 'tweets') at getDetailsConcise (D:\web-twitter-downloader\node_modules\twitter-url\index.js:35:35) at test (D:\web-twitter-downloader\app.js:5:20) at Object. (D:\web-twitter-downloader\app.js:10:1) at Module._compile (node:internal/modules/cjs/loader:1256:14) at Module._extensions..js (node:internal/modules/cjs/loader:1310:10) at Module.load (node:internal/modules/cjs/loader:1119:32) at Module._load (node:internal/modules/cjs/loader:960:12) at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12) at node:internal/main/run_main_module:23:47

vt107 commented 1 year ago

same here. I think twitter has changed their apis. Now their api returns "Sorry, that page does not exist" for old apis

Stalker-moment commented 1 year ago

same here. I think twitter has changed their apis. Now their api returns "Sorry, that page does not exist" for old apis

so have to use twitter official api?, how to get it?

vt107 commented 1 year ago

same here. I think twitter has changed their apis. Now their api returns "Sorry, that page does not exist" for old apis

so have to use twitter official api?, how to get it?

https://developer.twitter.com/en/docs/twitter-api We need to pay in order to use twitter API v2

PrinceKomali commented 1 year ago

This API probably won’t work anymore unfortunately. If you need to download Twitter videos what I’ve been doing is fetching fxtwitter instead of Twitter which has the URL in the response