HitomaruKonpaku / twspace-crawler

Script to monitor & download Twitter Spaces 24/7
201 stars 41 forks source link

(HELP) TypeError: Cannot read property '0' of null #19

Closed FevLoad closed 2 years ago

FevLoad commented 2 years ago

twspace-crawler --url https://twitter.com/i/spaces/1ZkJzbWyoqZJv 2022-02-13T20:15:48.881Z | [INFO] ================================================================================ 2022-02-13T20:15:48.883Z | [INFO] Version: 1.11.1 2022-02-13T20:15:48.884Z | [INFO] Starting in url mode | {"url":"https://twitter.com/i/spaces/1ZkJzbWyoqZJv"} 2022-02-13T20:15:48.884Z | [VERBOSE] [SpaceDownloader] Playlist path: "/home/USR/twdl/download/2202132015.m3u8" 2022-02-13T20:15:48.885Z | [VERBOSE] [SpaceDownloader] Audio path: "/home/USR/twdl/download/2202132015.m4a" (node:30337) UnhandledPromiseRejectionWarning: TypeError: Cannot read property '0' of null at Function.getFinalPlaylistName (/usr/lib/node_modules/twspace-crawler/dist/utils/PeriscopeUtil.js:9:42) at Function.getFinalPlaylistUrl (/usr/lib/node_modules/twspace-crawler/dist/apis/PeriscopeApi.js:21:71) at processTicksAndRejections (internal/process/task_queues.js:95:5) at async SpaceDownloader.download (/usr/lib/node_modules/twspace-crawler/dist/modules/SpaceDownloader.js:33:32) (Use node --trace-warnings ... to show where the warning was created) (node:30337) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1) (node:30337) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

I don't know how to fix such problem if someone faced it or if I installed something wrong please guide me to fix it

HitomaruKonpaku commented 2 years ago

@FevLoad you just use wrong way.

It must be

twspace-crawler --id 1ZkJzbWyoqZJv
FevLoad commented 2 years ago

@FevLoad you just use wrong way.

It must be

twspace-crawler --id 1ZkJzbWyoqZJv

Getting this 022-02-14T04:21:06.843Z | [ERROR] [SpaceWatcher@1DXxyDLOXDbJM] checkDynamicPlaylist: Request failed with status code 429 | {"requestId":"51c26460-f440-408a-8910-57965552625e"}

HitomaruKonpaku commented 2 years ago

https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/429

Error 429 mean use flood server with so many requests.

Just wait a bit then try again I guess 🤔