From 06d30212f5c62dd5d01c0ef908db63807cf0239c Mon Sep 17 00:00:00 2001 From: bashonly Date: Fri, 15 Aug 2025 17:19:27 -0500 Subject: [PATCH] add comment Authored by: bashonly --- yt_dlp/extractor/tiktok.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/yt_dlp/extractor/tiktok.py b/yt_dlp/extractor/tiktok.py index 9516a8d200..60861db0cf 100644 --- a/yt_dlp/extractor/tiktok.py +++ b/yt_dlp/extractor/tiktok.py @@ -990,6 +990,8 @@ class TikTokUserIE(TikTokBaseIE): self._API_BASE_URL, display_id, f'Downloading page {page}', query=self._build_web_query(sec_uid, cursor)) + # Avoid infinite loop caused by bad device_id + # See: https://github.com/yt-dlp/yt-dlp/issues/14031 current_batch = sorted(traverse_obj(response, ('itemList', ..., 'id', {str}))) if current_batch and current_batch == sorted(seen_ids): message = 'TikTok API keeps sending the same page'