tiktok-scraper icon indicating copy to clipboard operation
tiktok-scraper copied to clipboard

yarn displays errors and scraper from console does not produce any output

Open gg4u opened this issue 2 years ago • 0 comments

I installed it but got this errors in yarn-error.log

Trace: 
  Error: https://registry.yarnpkg.com/@types%2fos: Not found
      at Request.params.callback [as _callback] (/usr/local/Cellar/yarn/1.21.1/libexec/lib/cli.js:66947:18)
      at Request.self.callback (/usr/local/Cellar/yarn/1.21.1/libexec/lib/cli.js:140665:22)
      at Request.emit (events.js:198:13)
      at Request.<anonymous> (/usr/local/Cellar/yarn/1.21.1/libexec/lib/cli.js:141637:10)
      at Request.emit (events.js:198:13)
      at IncomingMessage.<anonymous> (/usr/local/Cellar/yarn/1.21.1/libexec/lib/cli.js:141559:12)
      at Object.onceWrapper (events.js:286:20)
      at IncomingMessage.emit (events.js:203:15)
      at endReadableNT (_stream_readable.js:1145:12)
      at process._tickCallback (internal/process/next_tick.js:63:19)

I tried with npm earlier, got the following warningns:

npm i -g tiktok-scraper
npm WARN deprecated [email protected]: this library is no longer supported
npm WARN deprecated [email protected]: request-promise has been deprecated because it extends the now deprecated request package, see https://github.com/request/request/issues/3142
npm WARN deprecated [email protected]: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
npm WARN deprecated [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142

added 9 packages, removed 7 packages, changed 258 packages, and audited 268 packages in 52s

15 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities

yarn test output:


yarn run v1.22.19
warning ../package.json: No license field
$ eslint ./src/**/*.ts && jest --coverage --verbose

..tiktok-scraper/src/core/Downloader.ts
  121:81  error  Do not access Object.prototype method 'hasOwnProperty' from target object  no-prototype-builtins

../tiktok-scraper/src/core/TikTok.ts
   462:25  error  Assignment to property of function parameter 'item'      no-param-reassign
   463:25  error  Assignment to property of function parameter 'item'      no-param-reassign
   468:21  error  Expected to return a value at the end of arrow function  consistent-return
   582:21  error  Expected to return a value at the end of arrow function  consistent-return
   710:17  error  Assignment to property of function parameter 'item'      no-param-reassign
   796:21  error  Unexpected use of continue statement                     no-continue
  1204:35  error  Replace `"__NEXT_DATA__"))` with `'__NEXT_DATA__'))·`    prettier/prettier
  1222:65  error  Insert `;`                                               prettier/prettier

✖ 9 problems (9 errors, 0 warnings)
  2 errors and 0 warnings potentially fixable with the `--fix` option.

error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.


yarn build: successful.

I set up the right session sid_tt ( a string like: 56879f8925639e1beda52144da689dce , which is longer than the one I see in the examples) but:

tiktok-scraper trend -d -n 100 --session sid_tt=56879f8925639e1beda52144da689dce does not produce any result.

Could you kindly suggest how to solve it?

gg4u avatar Jul 19 '22 18:07 gg4u