diff --git a/README_EN.md b/README_EN.md
index f6700a02..ea5f17a0 100644
--- a/README_EN.md
+++ b/README_EN.md
@@ -13,30 +13,30 @@
-
🔥 TikTok Account Works/Collections/Live Streams/Videos/Albums/Music; Douyin Account Works/Videos/Albums/Favorites/Live Streams/Music/Collections/Comments/Account Data/Search Data/Popular List Data Acquisition Tools: Fully open-source, free tools implemented based on the HTTPX module; batch download of Douyin account published works, liked works, and favorited works; batch download of TikTok account published works and liked works; download of Douyin linked or TikTok linked works; obtain Douyin live stream push addresses; download Douyin live stream videos; obtain TikTok live stream push addresses; download TikTok live stream videos; collect Douyin works comment data; batch download of Douyin Collections works; batch download of TikTok Collections works; collect detailed data of Douyin accounts; collect Douyin user/work/live stream search results; collect Douyin popular list data.
+🔥 TikTok Account Works/Mix/Live/Video/Image/Music; Douyin Account Works/Video/Image/LivePhoto/Favorites/Live/Music/Collections/Comments/Account Data/Search Data/Hot Board Data Acquisition Tools: Fully open-source, free tools implemented based on the HTTPX module; batch download of Douyin account posts works, liked works, and collections works; batch download of TikTok account posts works and liked works; download of Douyin linked or TikTok linked works; obtain Douyin live stream addresses; download Douyin live stream video; obtain TikTok live stream addresses; download TikTok live stream video; collect Douyin works comment data; batch download of Douyin Mix works; batch download of TikTok Mix works; collect detailed data of Douyin accounts; collect Douyin user/works/live search results; collect Douyin Hot Board data.
⭐ This project is completely free and open-source, with no paid features. Please do not be deceived!
⭐ Due to the author's limited energy, I was unable to update the English document in a timely manner, and the content may have become outdated, partial translation is machine translation, the translation result may be incorrect, Suggest referring to Chinese documentation. If you want to contribute to translation, we warmly welcome you.
# 📝 Project Features
-* ✅ Download Douyin videos/albums without watermarks
-* ✅ Download TikTok videos/albums without watermarks
-* ✅ Batch download of Douyin account published/liked/favorited works
-* ✅ Batch download of TikTok account published/liked works
+* ✅ Download Douyin video/image without watermarks
+* ✅ Download TikTok video/image without watermarks
+* ✅ Batch download of Douyin account posts/liked/favorites works
+* ✅ Batch download of TikTok account posts/liked works
* ✅ Collect detailed data from Douyin/TikTok
* ✅ Batch download of linked works
* ✅ Batch download of works from multiple accounts
* ✅ Automatically skip already downloaded files
* ✅ Persistently save collected data
* ✅ Download dynamic/static cover images
-* ✅ Obtain Douyin live stream push addresses
-* ✅ Obtain TikTok live stream push addresses
-* ✅ Use ffmpeg to download live streams
+* ✅ Obtain Douyin live stream addresses
+* ✅ Obtain TikTok live stream addresses
+* ✅ Use ffmpeg to download live video
* ✅ Web UI interaction interface
* ✅ Collect comment data from Douyin works
-* ✅ Batch download of Douyin Collections works
-* ✅ Batch download of TikTok Collections works
+* ✅ Batch download of Douyin Mix works
+* ✅ Batch download of TikTok Mix works
* ✅ Record statistics such as likes and favorites
* ✅ Filter works based on publication time
* ✅ Support incremental downloading of account works
@@ -48,7 +48,7 @@
* ✅ Deploy to private servers
* ✅ Deploy to public servers
* ✅ Collect Douyin search data
-* ✅ Collect Douyin hot list data
+* ✅ Collect Douyin hot board data
* ✅ Record IDs of already downloaded works
* ☑️ ~~Scan QR code to log in and obtain Cookies~~
* ✅ Obtain Cookies from browsers
@@ -165,23 +165,23 @@
[Click to view Cookie tutorial](https://github.com/JoeanAmier/TikTokDownloader/blob/master/docs/Cookie%E8%8E%B7%E5%8F%96%E6%95%99%E7%A8%8B.md)
-| Program Function | Login Required |
-|:---------------------------------:|:----------------------:|
-| Download Account Published Works | ⭕ Recommended to Login |
-| Download Account Liked Works | ⭕ Recommended to Login |
-| Download Linked Works | ⭕ Recommended to Login |
-| Obtain Live Stream Push Address | ❌ No Login Required |
-| Download Live Stream Videos | ❌ No Login Required |
-| Obtain Work Comment Data | ⭕ Recommended to Login |
-| Download Collections Works | ⭕ Recommended to Login |
-| Obtain Account Data | ⭕ Recommended to Login |
-| Collect Search Results | ⭕ Recommended to Login |
-| Collect Hot List Data | ❌ No Login Required |
-| Download Favorited Works | ✔️ Login Required |
-| Download Favorites Folder Works | ✔️ Login Required |
-| Obtain Favorites Collections Data | ✔️ Login Required |
-| Obtain Favorites Music Data | ✔️ Login Required |
-| Obtain Favorites Short Drama Data | ✔️ Login Required |
+| Program Function | Login Required |
+|:----------------------------:|:----------------------:|
+| Download Account Posts Works | ⭕ Recommended to Login |
+| Download Account Liked Works | ⭕ Recommended to Login |
+| Download Linked Works | ⭕ Recommended to Login |
+| Obtain Live Stream Address | ❌ No Login Required |
+| Download Live Video | ❌ No Login Required |
+| Obtain Works Comment Data | ⭕ Recommended to Login |
+| Download Mix Works | ⭕ Recommended to Login |
+| Obtain Account Data | ⭕ Recommended to Login |
+| Collect Search Results | ⭕ Recommended to Login |
+| Collect Hot Board Data | ❌ No Login Required |
+| Download Favorites Works | ✔️ Login Required |
+| Download Collections Works | ✔️ Login Required |
+| Obtain Collections Mix | ✔️ Login Required |
+| Obtain Collections Music | ✔️ Login Required |
+| Obtain Collections Series | ✔️ Login Required |
> * Cookie only needs to be re-written to the configuration file after it expires, and not every time the program is
run.
@@ -197,11 +197,11 @@
- When the program prompts the user for input, pressing Enter directly will return to the previous menu, and inputting
Q
or q
will end the program's execution.
-- Since fetching data for liked and favorited works of an account only returns the publication dates of those works, not the dates of the actions (liking or favoriting), the program needs to retrieve all liked and favorited works data before performing date filtering. If there are a large number of works, this may take a considerable amount of time. The number of requests can be controlled via the
max_pages
parameter.
+- Since fetching data for liked and favorites works of an account only returns the publication dates of those works, not the dates of the actions (liking or favouring), the program needs to retrieve all liked and favorites works data before performing date filtering. If there are a large number of works, this may take a considerable amount of time. The number of requests can be controlled via the
max_pages
parameter.
- To obtain data for posts made by a private account, a logged-in Cookie is required, and the logged-in account must follow the private account.
-- When batch downloading works or Collections works of an account, if the corresponding nickname or identifier changes, the program will automatically update the nickname and identifier in the file names of the downloaded works.
+- When batch downloading account posts works or mix works, if the corresponding nickname or mark parameter changes, the program will automatically update the nickname and mark parameter in the file names of the downloaded works.
- When downloading files, the program first downloads them to a temporary folder and then moves them to the storage folder upon completion. The temporary folder will be emptied when the program ends.
-- The
Batch Download Favorited Works Mode
currently only supports downloading favorited works for the account corresponding to the currently logged-in Cookie and does not support multiple accounts.
+- The
Batch Download Favorites Works Mode
currently only supports downloading favorited works for the account corresponding to the currently logged-in Cookie and does not support multiple accounts.
- If you want the program to use a proxy to request data, you must set the
proxy
parameter in settings.json
; otherwise, the program will not use a proxy.
- To exit the program, please end it in a normal way or by pressing Ctrl + C. Do not directly close the terminal window, as this may result in data loss.
- If your computer does not have a suitable program for editing JSON files, we recommend using the JSON Online Tool to edit the configuration file content.
diff --git a/src/downloader/download.py b/src/downloader/download.py
index b286df7c..b46d2afb 100644
--- a/src/downloader/download.py
+++ b/src/downloader/download.py
@@ -47,7 +47,7 @@ class Downloader:
semaphore = Semaphore(MAX_WORKERS)
CONTENT_TYPE_MAP = {
"image/png": "png",
- "image/jpeg": "jpg",
+ "image/jpeg": "jpeg",
"image/webp": "webp",
"video/mp4": "mp4",
"video/quicktime": "mov",
@@ -290,12 +290,15 @@ async def downloader_chart(
semaphore: Semaphore = None,
**kwargs):
with progress:
- tasks = [self.request_file(
- *task,
- count=count,
- **kwargs,
- progress=progress,
- semaphore=semaphore, ) for task in tasks]
+ tasks = [
+ self.request_file(
+ *task,
+ count=count,
+ **kwargs,
+ progress=progress,
+ semaphore=semaphore,
+ ) for task in tasks
+ ]
await gather(*tasks)
def deal_folder_path(self,
@@ -502,7 +505,7 @@ async def request_file(
case 1:
return await self.download_file(
temp,
- actual,
+ actual.with_suffix(f".{suffix}", ),
show,
id_,
response,
@@ -644,7 +647,8 @@ def generate_detail_name(self, data: dict) -> str:
return beautify_string(
self.cleaner.filter_name(
self.split.join(
- data[i] for i in self.name_format),
+ data[i] for i in self.name_format
+ ),
data["id"],
), length=MAX_FILENAME_LENGTH,
)
diff --git a/src/extract/extractor.py b/src/extract/extractor.py
index 289b719f..3e4b0dbb 100644
--- a/src/extract/extractor.py
+++ b/src/extract/extractor.py
@@ -360,7 +360,7 @@ def __extract_image_info(
if self.safe_extract(images[-1], "video"):
self.__set_blank_data(item, data, _("实况"), )
item["downloads"] = [
- self.__extract_video_download(i, ) for i in images
+ self.__classify_slides_item(i, ) for i in images
]
else:
self.__set_blank_data(item, data, _("图集"), )
@@ -409,6 +409,11 @@ def __extract_video_info(
data, "video.play_addr.uri")
self.__extract_cover(item, data, True)
+ def __classify_slides_item(self, item: SimpleNamespace, ) -> str:
+ if self.safe_extract(item, "video"):
+ return self.__extract_video_download(item, )
+ return self.safe_extract(item, f'url_list[{IMAGE_INDEX}]')
+
def __extract_video_download(self, data: SimpleNamespace, ) -> str:
bit_rate: list[SimpleNamespace] = self.safe_extract(
data,
@@ -425,7 +430,7 @@ def __extract_video_download(self, data: SimpleNamespace, ) -> str:
return self.safe_extract(
bit_rate[-1][-1],
f"url_list[{VIDEO_INDEX}]",
- )
+ ) if bit_rate else ""
def __extract_video_info_tiktok(
self,