import requests
import json
from bs4 import BeautifulSoup
url = '
https://www.tiktok.com/@golden_men_6/video/6803237...'
headers = {'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.116 Safari/537.36'}
r = requests.get(url, headers=headers)
soup = BeautifulSoup(r.text, 'html.parser')
script = soup.find('script', attrs={'id': 'videoObject'})
data = json.loads(str(script.contents[0]))
video_url = data['contentUrl']
print(video_url)