mirror of
https://github.com/NanmiCoder/MediaCrawler.git
synced 2025-11-25 11:29:27 +08:00
修改部分文档
This commit is contained in:
@@ -11,7 +11,7 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# @Author : helloteemo
|
||||
# @Time : 2024/7/12 20:01
|
||||
# @Desc : bilibili图片保存
|
||||
# @Desc : bilibili 媒体保存
|
||||
import pathlib
|
||||
from typing import Dict
|
||||
|
||||
@@ -27,8 +27,9 @@ class BilibiliVideo(AbstractStoreVideo):
|
||||
async def store_video(self, video_content_item: Dict):
|
||||
"""
|
||||
store content
|
||||
|
||||
Args:
|
||||
content_item:
|
||||
video_content_item:
|
||||
|
||||
Returns:
|
||||
|
||||
@@ -38,8 +39,11 @@ class BilibiliVideo(AbstractStoreVideo):
|
||||
def make_save_file_name(self, aid: str, extension_file_name: str) -> str:
|
||||
"""
|
||||
make save file name by store type
|
||||
|
||||
Args:
|
||||
aid: aid
|
||||
extension_file_name: video filename with extension
|
||||
|
||||
Returns:
|
||||
|
||||
"""
|
||||
@@ -48,9 +52,11 @@ class BilibiliVideo(AbstractStoreVideo):
|
||||
async def save_video(self, aid: int, video_content: str, extension_file_name="mp4"):
|
||||
"""
|
||||
save video to local
|
||||
|
||||
Args:
|
||||
aid: aid
|
||||
video_content: video content
|
||||
extension_file_name: video filename with extension
|
||||
|
||||
Returns:
|
||||
|
||||
|
||||
@@ -23,8 +23,9 @@ class DouYinImage(AbstractStoreImage):
|
||||
async def store_image(self, image_content_item: Dict):
|
||||
"""
|
||||
store content
|
||||
|
||||
Args:
|
||||
content_item:
|
||||
image_content_item:
|
||||
|
||||
Returns:
|
||||
|
||||
@@ -34,9 +35,10 @@ class DouYinImage(AbstractStoreImage):
|
||||
def make_save_file_name(self, aweme_id: str, extension_file_name: str) -> str:
|
||||
"""
|
||||
make save file name by store type
|
||||
|
||||
Args:
|
||||
aweme_id: aweme id
|
||||
picid: image id
|
||||
extension_file_name: image filename with extension
|
||||
|
||||
Returns:
|
||||
|
||||
@@ -46,9 +48,11 @@ class DouYinImage(AbstractStoreImage):
|
||||
async def save_image(self, aweme_id: str, pic_content: str, extension_file_name):
|
||||
"""
|
||||
save image to local
|
||||
|
||||
Args:
|
||||
aweme_id: aweme id
|
||||
pic_content: image content
|
||||
extension_file_name: image filename with extension
|
||||
|
||||
Returns:
|
||||
|
||||
@@ -66,8 +70,9 @@ class DouYinVideo(AbstractStoreVideo):
|
||||
async def store_video(self, video_content_item: Dict):
|
||||
"""
|
||||
store content
|
||||
|
||||
Args:
|
||||
content_item:
|
||||
video_content_item:
|
||||
|
||||
Returns:
|
||||
|
||||
@@ -77,9 +82,10 @@ class DouYinVideo(AbstractStoreVideo):
|
||||
def make_save_file_name(self, aweme_id: str, extension_file_name: str) -> str:
|
||||
"""
|
||||
make save file name by store type
|
||||
|
||||
Args:
|
||||
aweme_id: aweme id
|
||||
picid: image id
|
||||
extension_file_name: video filename with extension
|
||||
|
||||
Returns:
|
||||
|
||||
@@ -89,9 +95,11 @@ class DouYinVideo(AbstractStoreVideo):
|
||||
async def save_video(self, aweme_id: str, video_content: str, extension_file_name):
|
||||
"""
|
||||
save video to local
|
||||
|
||||
Args:
|
||||
aweme_id: aweme id
|
||||
pic_content: image content
|
||||
video_content: video content
|
||||
extension_file_name: video filename with extension
|
||||
|
||||
Returns:
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# @Author : Erm
|
||||
# @Time : 2024/4/9 17:35
|
||||
# @Desc : 微博保存图片类
|
||||
# @Desc : 微博媒体保存
|
||||
import pathlib
|
||||
from typing import Dict
|
||||
|
||||
@@ -27,8 +27,9 @@ class WeiboStoreImage(AbstractStoreImage):
|
||||
async def store_image(self, image_content_item: Dict):
|
||||
"""
|
||||
store content
|
||||
|
||||
Args:
|
||||
content_item:
|
||||
image_content_item:
|
||||
|
||||
Returns:
|
||||
|
||||
@@ -38,8 +39,10 @@ class WeiboStoreImage(AbstractStoreImage):
|
||||
def make_save_file_name(self, picid: str, extension_file_name: str) -> str:
|
||||
"""
|
||||
make save file name by store type
|
||||
|
||||
Args:
|
||||
picid: image id
|
||||
extension_file_name: video filename with extension
|
||||
|
||||
Returns:
|
||||
|
||||
@@ -49,9 +52,11 @@ class WeiboStoreImage(AbstractStoreImage):
|
||||
async def save_image(self, picid: str, pic_content: str, extension_file_name="jpg"):
|
||||
"""
|
||||
save image to local
|
||||
|
||||
Args:
|
||||
picid: image id
|
||||
pic_content: image content
|
||||
extension_file_name: image filename with extension
|
||||
|
||||
Returns:
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# @Author : helloteemo
|
||||
# @Time : 2024/7/11 22:35
|
||||
# @Desc : 小红书图片保存
|
||||
# @Desc : 小红书媒体保存
|
||||
import pathlib
|
||||
from typing import Dict
|
||||
|
||||
@@ -27,8 +27,9 @@ class XiaoHongShuImage(AbstractStoreImage):
|
||||
async def store_image(self, image_content_item: Dict):
|
||||
"""
|
||||
store content
|
||||
|
||||
Args:
|
||||
content_item:
|
||||
image_content_item:
|
||||
|
||||
Returns:
|
||||
|
||||
@@ -38,9 +39,10 @@ class XiaoHongShuImage(AbstractStoreImage):
|
||||
def make_save_file_name(self, notice_id: str, extension_file_name: str) -> str:
|
||||
"""
|
||||
make save file name by store type
|
||||
|
||||
Args:
|
||||
notice_id: notice id
|
||||
picid: image id
|
||||
extension_file_name: image filename with extension
|
||||
|
||||
Returns:
|
||||
|
||||
@@ -50,9 +52,11 @@ class XiaoHongShuImage(AbstractStoreImage):
|
||||
async def save_image(self, notice_id: str, pic_content: str, extension_file_name):
|
||||
"""
|
||||
save image to local
|
||||
|
||||
Args:
|
||||
notice_id: notice id
|
||||
pic_content: image content
|
||||
extension_file_name: image filename with extension
|
||||
|
||||
Returns:
|
||||
|
||||
@@ -70,8 +74,9 @@ class XiaoHongShuVideo(AbstractStoreVideo):
|
||||
async def store_video(self, video_content_item: Dict):
|
||||
"""
|
||||
store content
|
||||
|
||||
Args:
|
||||
content_item:
|
||||
video_content_item:
|
||||
|
||||
Returns:
|
||||
|
||||
@@ -81,8 +86,10 @@ class XiaoHongShuVideo(AbstractStoreVideo):
|
||||
def make_save_file_name(self, notice_id: str, extension_file_name: str) -> str:
|
||||
"""
|
||||
make save file name by store type
|
||||
|
||||
Args:
|
||||
notice_id: notice id
|
||||
extension_file_name: video filename with extension
|
||||
|
||||
Returns:
|
||||
|
||||
@@ -91,10 +98,12 @@ class XiaoHongShuVideo(AbstractStoreVideo):
|
||||
|
||||
async def save_video(self, notice_id: str, video_content: str, extension_file_name):
|
||||
"""
|
||||
save image to local
|
||||
save video to local
|
||||
|
||||
Args:
|
||||
notice_id: notice id
|
||||
video_content: video content
|
||||
extension_file_name: video filename with extension
|
||||
|
||||
Returns:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user