scrapetube

dermasmidMIT长期未更新

用 Python 抓取 YouTube 频道、播放列表和搜索结果,绕开官方 API 限制获取视频数据。

A YouTube scraper for scraping channels, playlists, and searching 🔎

v2.6.0发布于 2025-09-16 17:49 UTC526star74fork同步于 2026-11-07 07:34 UTC

怎么上手

由 README 提炼,执行前请确认
pip3 install scrapetube
硬件要求按 README 说明

README 未说明

下载:源码 zip·GitHub Releases(安装包)本站不镜像安装包

项目说明

由 README 自动翻译提炼

不用官方 API 和 Selenium 就能抓取 YouTube 频道、播放列表和搜索结果的 Python 库

用 Python 抓取 YouTube 频道、播放列表和搜索结果,绕开官方 API 限制获取视频数据。

核心能力

  • 用 get_channel 遍历频道全部视频
  • 用 get_playlist 抓取播放列表全部视频
  • 用 get_search 按关键词搜索视频
  • 无需 YouTube 官方 API 和 Selenium

容易踩的坑

README 未说明是否需要额外依赖或代理

内容由模型根据 README 生成,可能不完整或不准确,以官方文档为准。看原文 README

最近发版

5 个版本v2.6.0
  1. v2.6.0最新正式版2025-09-16 · 2025-09-16 17:49 UTC

    这个版本没有写更新说明。

  2. v2.5.12023-09-03 · 2023-09-03 21:54 UTC
    查看更新说明

    Merge #38

  3. v2.5.02023-07-14 · 2023-07-14 00:18 UTC
    查看更新说明
    • fix sort by when getting channel #31
    • set lang #10
    • get single video #15
  4. v2.4.02023-06-12 · 2023-06-12 20:19 UTC
    查看更新说明

    add support for channel_username

  5. v2.3.12022-11-03 · 2022-11-03 06:27 UTC
    查看更新说明

    fix #16

用户点评

登录用户的真实使用记录,可按版本和硬件筛选
共 0 条

    还没有人点评。第一个说出真实体验的人最有价值。

    README 原文

    未翻译

    Scrapetube

    This module will help you scrape youtube without the official youtube api and without selenium.

    With this module you can:

    • Get all videos from a Youtube channel.
    • Get all videos from a playlist.
    • Search youtube.

    Installation

    pip3 install scrapetube
    

    Usage

    Here's a few short code examples.

    Get all videos for a channel

    import scrapetube
    
    videos = scrapetube.get_channel("UCCezIgC97PvUuR4_gbFUs5g")
    
    for video in videos:
        print(video['videoId'])
    

    Get all videos for a playlist

    import scrapetube
    
    videos = scrapetube.get_playlist("PL-osiE80TeTt2d9bfVyTiXJA-UTHn6WwU")
    
    for video in videos:
        print(video['videoId'])
    

    Make a search

    import scrapetube
    
    videos = scrapetube.get_search("python")
    
    for video in videos:
        print(video['videoId'])
    

    Full Documentation

    https://scrapetube.readthedocs.io/en/latest/