Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

爬取到的视频能存储为mp4格式吗,想把它下载下来,目前来看只有一个链接 #481

Open
song9910moon opened this issue Nov 3, 2024 · 4 comments

Comments

@song9910moon
Copy link

No description provided.

@song9910moon song9910moon changed the title 爬取到的视频能存储为📇 爬取到的视频能存储为mp4格式吗,想把它下载下来,目前来看只有一个链接 Nov 3, 2024
@NanmiCoder
Copy link
Owner

MediaCrawler当前不会处理视频下载,后续可能考虑单独出一个仓库来下载指定自媒体URL链接的图片和视频信息。

@song9910moon
Copy link
Author

MediaCrawler当前不会处理视频下载,后续可能考虑单独出一个仓库来下载指定自媒体URL链接的图片和视频信息。

谢谢 希望还能够保留关键词检索并下载视频的功能,这是非常好的设置

@hezhenfan
Copy link

async def get_note_media(self, url: str) -> Union[bytes, None]:
    async with httpx.AsyncClient(proxies=self.proxies) as client:
        response = await client.request("GET", url, timeout=self.timeout)
        if not response.reason_phrase == "OK":
            utils.logger.error(f"[XiaoHongShuClient.get_note_media] request {url} err, res:{response.text}")
            return None
        else:
            return response.content

此处不是把视频url存储为mp4?

@NanmiCoder
Copy link
Owner

async def get_note_media(self, url: str) -> Union[bytes, None]:
    async with httpx.AsyncClient(proxies=self.proxies) as client:
        response = await client.request("GET", url, timeout=self.timeout)
        if not response.reason_phrase == "OK":
            utils.logger.error(f"[XiaoHongShuClient.get_note_media] request {url} err, res:{response.text}")
            return None
        else:
            return response.content

此处不是把视频url存储为mp4?

目前没有支持全平台,回来考虑讲已经实现的功能从仓库移除出去,视频下载会block信息的爬取。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants