A scraper for everything on YouTube
Project description
YouTube-Scraping-API
An easy-to-use YouTube API, without any kind of quota, and download any videos on youtube as much as you like.
I'm still working on it, so stay tuned for more updates to come.
Documentation
Installing the API
pip install youtube-scraping-api
Importing the API
from youtube_scraping_api import YouTubeAPI
api = YouTubeAPI()
Search
Returns a collection of search results that match the query parameters specified in the API request.
api.search(query=None, continuation_token=None)
Playlist
Returns a collection of items and metadata of playlists that match the API request parameters.
api.playlist(playlistId=None, continuation_token=None, parseAll=True)
Channel (working)
Returns a collection data of channel resources that match the request criteria.
api.channel(channelId=None, username=None)
Video
Parse the data of the video that matches the video ID.
video = api.video(videoId)
#get the data of the video
video.get_json()
Download Video
Download the video with whatever resolution you want up to 720p.
video = api.video(videoId)
video.download(itag=None, path=".", log_progress=True, chunk_size=4096, callback_func=None)
Captions
Parse captions available for the video.
video = api.video(videoId)
#query containing every available captions of the video
captions = video.captions
#return the caption that matches the language code. Return default language if language code isn't provided
caption = captions.get_caption(language_code='en')
#return all available translation languages if the caption is translatable
available_translation_language = caption.available_translations
#return the translation of the caption if it's translatable
translated_caption = caption.translate_to('zh-Hant')
#return the caption in string format
caption.string
#return the caption in dictionary format with starting time and duration of each text snippet
caption.dict
Version
0.0.1 (deleted)
- Not an official release (careless bug found)
0.0.2
- Freshly uploaded this package to PyPi
0.0.3/0.0.4/0.0.5
- Updated README.md
0.1.0
- Video caption feature added
0.1.1
- Updated README.md
0.1.2
- minor bug fixed on video download
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for youtube-scraping-api-1.0.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1a70f5e19ab9a83e07947d153ffbaf664505347c6050b6487c6e17dbc0808840 |
|
MD5 | 0a1002da68de29589d5d7b3619aec7ca |
|
BLAKE2b-256 | b4e759c6071af4dd11e76108788c1d2093c44cbfee1b93540a5b79c60489af09 |
Hashes for youtube_scraping_api-1.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 52a1e0c09c3d6a2b892d5ce4bca9583f3c2d47a8ea157f4182c01c3ccf7e88b1 |
|
MD5 | 114899af36d1c4d36b177e3c09b983d7 |
|
BLAKE2b-256 | b1130bd2cb4200eab9fdaa52ba5a43729333adcbbd48aa6857c34bdee17e8d16 |