Tools Ways to rip entire TikTok profile?

Really weird, tikwm started working for me again recently but just now it stopped.
 
tikwm now puts a separate managed Cloudflare challenge on the /api/* path, distinct from the homepage. My unattended scraper wasn't working for a week and i noticed it only now.
 
Since TikWM added a CF challenge to the user info API, some may find this useful:

Code:
		$UserAgent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 Chrome/115.0 Safari/537.36"
$HTMLRegex = '\s*(.*?)\s*'

$Account = "lilkassb"

try
{
    $HTML = Invoke-WebRequest -Uri https://www.tiktok.com/@$Account -UserAgent $UserAgent -ProgressAction SilentlyContinue

    if ($HTML -match $HTMLRegex)
    {
        $User                       = @{}
        $String                     = $matches[1]
        $Object                     = $String | ConvertFrom-Json -AsHashtable
        $Scope                      = $Object["__DEFAULT_SCOPE__"]
        $User["info"]               = $Scope."webapp.user-detail".userInfo.user
        $User["info"]["statusCode"] = $Scope."webapp.user-detail".statusCode
        $User["stats"]              = $Scope."webapp.user-detail".userInfo.statsV2
    } else
    {
        Write-Host "JSON script tag not found in HTML" -ForegroundColor DarkYellow
    }
} catch
{
    Write-Host "Status code: " -ForegroundColor Red -NoNewline; Write-Host "$($_.Exception.Response.StatusCode.value__)"
    Write-Host " Status msg: " -ForegroundColor Red -NoNewline; Write-Host "$($_.Exception.Response.StatusCode)"
    Write-Host "  Error msg: " -ForegroundColor Red -NoNewline; Write-Host "$($_.Exception.Message)"
}

If uniqueId doesn't work, try with userId instead.
 
Ripping a profile? I'm a code noob so I don't know if this script goes into the ripper or do I run it somewhere?
 
TikWM has added Proton IPs to an exclusion list or something similar, I can't reliably get source anymore using the API. Sometimes it works, but doesn't return source quality. Don't really know why, also this just happened yesterday.
If you're using Proton, either add TikWM IPs to split tunnelling exclusion or use a proxy for now, it could be temporary but I doubt it.
 
+1 Doesn't work for me, too, since 2 days with ProtonVPN. Returns following error:

Code:
Failed to request source from TikWM for video Error: 403 Client Error: Forbidden for url:
 
Is awemer's script still useful for downloading private stories on source quality? I get "[WARNING] Attempt (1/3) to fetch user info failed: No valid JSON content in the response data." I already updated my cookie sid_tt
 
Back
Top