Skip to content
View x0-akm7's full-sized avatar

Block or report x0-akm7

Block user

Prevent this user from interacting with your repositories and sending you notifications. Learn more about blocking users.

You must be logged in to block users.

Maximum 250 characters. Please don't include any personal information such as legal names or email addresses. Markdown supported. This note will be visible to only you.
Report abuse

Contact GitHub support about this user’s behavior. Learn more about reporting abuse.

Report abuse
X0-akm7/README.md

import requests, re

links = [ "https://www.tiktokv.com/share/video/7396733314398244138/", "https://www.tiktokv.com/share/video/7430461089151798571/" ]

def resolve_tiktok(share_link): headers = {'User-Agent': 'Mozilla/5.0'} resp = requests.get(share_link, headers=headers, allow_redirects=True, timeout=10) final = resp.url m = re.search(r'(https?://www.tiktok.com/(@[\w.-]+)/video/(\d+))', final) if m:# Welcome to My Profile!

TikTok Link Resolver Script

Below is a Python script I wrote to resolve TikTok share links to their canonical form:

import requests, re

links = [
    "https://www.tiktokv.com/share/video/7396733314398244138/",
    "https://www.tiktokv.com/share/video/7430461089151798571/"
]

def resolve_tiktok(share_link):
    headers = {'User-Agent': 'Mozilla/5.0'}
    resp = requests.get(share_link, headers=headers, allow_redirects=True, timeout=10)
    final = resp.url
    m = re.search(r'(https?://www\.tiktok\.com/(@[\w\.-]+)/video/(\d+))', final)
    if m:
        return {'full_url': m.group(1), 'username': m.group(2), 'video_id': m.group(3)}
    return {'full_url': final, 'username': None, 'video_id': None}

for url in links:
    result = resolve_tiktok(url)
    print(f"{url}{result['username']}, {result['full_url']}")
**x0-akm7/X0-akm7** is a_special_repository because its `README.md` (this file) appears on your GitHub profile.

- 🔭 Im currently working on learning coding
- 🌱 Im currently learning more about coding for fun
- 👯 Im looking to collaborate on new to this wouldn't be much help at the moment 
- 🤔 Im looking for help with coding in general
- 💬 Ask me about anything
- 📫 How to reach me: here in GitHub send me a message 
- 😄 Pronouns: She/her
-Fun fact: I have 3 cats and a bearded dragon
-->

Popular repositories Loading

  1. X0-akm7 X0-akm7 Public

    View TikTok user’s profile with the watch history 🔗 numerical 🆔