diff --git a/src/you_get/extractors/douyin.py b/src/you_get/extractors/douyin.py index 5de1fdd9..8067b1b5 100644 --- a/src/you_get/extractors/douyin.py +++ b/src/you_get/extractors/douyin.py @@ -1,6 +1,7 @@ # coding=utf-8 import re +import json from urllib.parse import unquote from ..common import ( @@ -18,17 +19,17 @@ __all__ = ['douyin_download_by_url'] def douyin_download_by_url(url, **kwargs): page_content = get_content(url, headers=fake_headers) - # The easiest way to get the title is, obviously, from - title = re.findall(r'<title.*>(.*)', page_content)[0].strip() - # Remove the site name from title - site_name = ' - 抖音' - if title.endswith(site_name): - title = title[:-len(site_name)] + # The video player and video source are rendered client-side, the data + # contains in a