API client for Piped: https://github.com/TeamPiped/Piped Forked to allow for Search Queries
Find a file
2022-02-27 09:00:31 +01:00
.github/workflows Resolve conflicts 2022-02-26 11:42:52 +01:00
piped_api Fix README path 2022-02-27 08:50:47 +01:00
scripts Comments 2022-02-26 10:35:58 +01:00
tests Trending videos 2022-02-27 08:40:58 +01:00
.gitignore Comments 2022-02-26 10:35:58 +01:00
LICENSE Initial commit 2022-01-23 11:14:52 +01:00
README.md Fix donation links 2022-02-27 09:00:31 +01:00
requirements.txt Comments 2022-02-26 10:35:58 +01:00
setup.py Trending videos 2022-02-27 08:40:58 +01:00

Piped API client (Python)

Test with pyTest

A Python API wrapper for Piped. This can essentially be used as an alternative way to access YouTube's API, without needing to use an API key.

Installation

pip install piped-api

Quickstart

Getting started is very easy:

from piped_api import PipedClient

CLIENT = PipedClient()


# Print out the first audio stream URL for a video:
video = CLIENT.get_video(video_id)
audio_stream = video.get_streams('audio')[0]

print(f"Audio stream URL: {audio_stream.url} ({audio_stream.mime_type})")

Why?

This package has allowed me to start creating my open-source project, ArchiveTube - a scrapper and archive for YouTube content (videos and comments) - to preserve them and make them available to anyone, with ability to search for comments and videos. View hall of fame (most liked comments and videos), bring back dislikes via ReturnYouTubeDislike.com, view deleted content and much more! Google has showed us that they make YouTube own us by harvesting our data. This is also followed by non-throught out decisions, which their users aren't happy with. Let's do it the other way around this time by reclaiming our content and entertainment back & make YouTube great again!

The creation of this package was also primarily fueled by the same type of motivation Piped has.

Google's API is not very easy-to-use - you must obtain some JSON thingy to use it, and it is very low-level and not very user-friendly. On the other hand, this package accessed the Piped API, which has a much more high-level API and doesn't need an account or API keys.

It is not meant to be a replacement for the official YouTube API, but it can help you to cut the strings that Google attaches to you when using their API.