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

Can't extract video metadata.

Open netherlink117 opened this issue 4 years ago • 24 comments
trafficstars

Describe the bug Some videos throws this kind of message to the console (CMD):

Can't extract video metadata. https://www.tiktok.com/@some_user/video/some_video_id

I think the message is thrown randomly for some reason (I ran the script several times, while the error was thrown for some videos the first time, it was thrown to another videos the next times).

NOTE: I also notice that using -s and --historypath flags is being ignored.

If fields below will be empty then issue will be Ignored and Closed

To Reproduce Steps to reproduce the behavior:

  • Used OS Windows 10 Pro Version 21H1 OS Build 19043.1237.
  • NodeJs Version (node -v) v14.17.3.
  • Scraper Version (tiktok-scraper --version) 1.4.36.
  • CLI or Module CLI.
  • Used method video or from-file.
  • Used options -d, --hd, -w, -s, --historypath and --session.
  • Do you run the scraper through Proxy, VPN, VPS? No.
  • If scraping from a profile. Did you checked if profile is Public? Scraper won't work with Private profiles! Yes, is public.
  • Preferably provide URL to the profile,hashtag,video and etc page Prefer not to share (is a long list of video URLs that changes by day).

Screenshots If applicable, add screenshots to help explain your problem.

netherlink117 avatar Sep 21 '21 12:09 netherlink117

Got a (somewhat) temporal fix for my issue using CLI in a batch file for CMD on Windows 10.

The script's name is ts-list.cmd and contains:

@echo off
setlocal enabledelayedexpansion
for /f "usebackq delims=" %%a in ("%~1") do (
  call :parse "%%a" 
)
goto :eof
:parse
set "url=%~1"
if not exist %cd%\%url:~-19,19%.mp4 (
  tiktok-scraper video -d -w --hd --session "sid_tt=<session>" "%url%"
)
goto :eof
endlocal

Just changed <session> to a correct value and placed the script in the user's folder (or somewhere accesible as the system variable PATH), and called the script with:

ts-list.cmd <file>

Where <file> is the path to a .txt file containing links to videos.

The tiktok-scraper stills throwing the mesage errors described in the issue, but since the script checks if the video was already downloaded and try to download only the ones that got the error on the past runs, it can download the full list of videos from the .txt file if it's ran more than one time.

netherlink117 avatar Sep 21 '21 13:09 netherlink117

I have the same issue. It was working fine before. I want NodeJS fix not CLI. any help plz?

aymenitc avatar Jan 05 '22 11:01 aymenitc

I'm also having the same issue. Probably, some TikTok scrape protection.

BrunoQuaresma avatar Jan 17 '22 01:01 BrunoQuaresma

adding this comment here, since @drawrowfly marked my issue as spam. This issue is 4 months old and not relevant to the new issues and isn't being discussed technically.

https://github.com/drawrowfly/tiktok-scraper/issues/724#issuecomment-1017907777

vanities avatar Jan 21 '22 18:01 vanities

I have some kind of similar issue. While trying to scrap metadata from a video https://vm.tiktok.com/ZMeb45Cv2/ it always throws error: Can't extract video metadata: https://vm.tiktok.com/ZMeb45Cv2/. But when I try to scrap the full link (that can be copied from browser, not the mobile app) it works fine: image

Could someone please advice on how to work with short TikTok URLs? Thanks!

P.S. Adding those headers mentioned in my code does not help to solve this issue.

@drawrowfly Could you please support with this problem?

Slikon avatar Jan 22 '22 12:01 Slikon

I will push soon updated version that will fix most of the existing problems

drawrowfly avatar Jan 22 '22 15:01 drawrowfly

Thank you. Waiting for update

في السبت، ٢٢ يناير ٢٠٢٢ ٦:٥٣ م Andrew Nord @.***> كتب:

I will push soon updated version that will fix most of the existing problems

— Reply to this email directly, view it on GitHub https://github.com/drawrowfly/tiktok-scraper/issues/681#issuecomment-1019296626, or unsubscribe https://github.com/notifications/unsubscribe-auth/ASKHVRSNIYGEY62Y434OYELUXLHIBANCNFSM5EOKVNIA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you commented.Message ID: @.***>

aymenitc avatar Jan 22 '22 15:01 aymenitc

Thanks for the fast response @drawrowfly :) I appreciate it and will stay tuned!

aleksnavratil avatar Jan 28 '22 19:01 aleksnavratil

@drawrowfly hey, any update on this?

DaStormer avatar Feb 05 '22 19:02 DaStormer

Call video url in postman and return empty data.

nguyen95 avatar Feb 13 '22 02:02 nguyen95

Tried both in CLI and docker and can't seem to get any videos to download due to failed metadata.

Is this scraper broken atm?

leele2 avatar Apr 14 '22 03:04 leele2

Having 100% failures as of today:

response.split("window['SIGI_STATE']=")[1]

is returning undefined

inside of getVideoMetadataFromHtml

and sometimes

const response = await this.request<string>(options);

is raising an error

Seems like SIGI are inside of scripts:

<script id="SIGI_STATE" type="application/json"> ....<script id="SIGI_RETRY" type="application/json">

vanities avatar Apr 22 '22 15:04 vanities

PR for a fix is incoming

vanities avatar Apr 22 '22 17:04 vanities

I have the same issue, all of my video -d calls are failing, with both the mobile and full links.

dannyb648 avatar Apr 22 '22 19:04 dannyb648

@vanities Would you have the PR number/link in hand?

brvnonascimento avatar May 24 '22 16:05 brvnonascimento

Is there a fix for this yet?

srinitude avatar Jun 03 '22 16:06 srinitude

When is this getting fixed?

nicolas-wl avatar Jul 25 '22 07:07 nicolas-wl

@drawrowfly Any updates on this?

srinitude avatar Jul 26 '22 13:07 srinitude

I have the same issue, is the npm repo getting updated?

shifoc avatar Jul 31 '22 19:07 shifoc

When is this getting fixed?

this is open source how about doing it yourself?

JoahTheron avatar Aug 14 '22 11:08 JoahTheron

The problem has not been fixed yet

yongchin0821 avatar Sep 19 '22 03:09 yongchin0821

Can't Extract Video Metadata response happened to me too💀

ThisMe124 avatar Nov 12 '22 12:11 ThisMe124

@ThisMe124 Check this out, fixed it for me

https://github.com/drawrowfly/tiktok-scraper/issues/794#issuecomment-1266028293

JakeMaldonado avatar Nov 15 '22 14:11 JakeMaldonado

Never mind, I can no longer access the https://www.tiktok.com/node/share/video/@franzundwach/7117621530086968582 endpoint. Is anyone able to? I found before that I only could If I logged in certain ways, but now I cant seem to hit it at all.

JakeMaldonado avatar Nov 18 '22 15:11 JakeMaldonado