All Projects → madeyoga → ytpy

madeyoga / ytpy

Licence: MIT license
Python asynchronous wrapper for searching for youtube videos.

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to ytpy

StateBuilder
State machine code generator for C++ and Java.
Stars: ✭ 30 (+57.89%)
Mutual labels:  asynchronous
drone-stm32-map
STM32 peripheral mappings for Drone, an Embedded Operating System.
Stars: ✭ 16 (-15.79%)
Mutual labels:  asynchronous
async
Synchronization and asynchronous computation package for Go
Stars: ✭ 104 (+447.37%)
Mutual labels:  asynchronous
WPWatcher
Wordpress Watcher is a wrapper for WPScan that manages scans on multiple sites and reports by email and/or syslog. Schedule scans and get notified when vulnerabilities, outdated plugins and other risks are found.
Stars: ✭ 34 (+78.95%)
Mutual labels:  asynchronous
nautilus.js
[separated fork] Async JavaScript loader & dependency manager in ~600B [gziped]
Stars: ✭ 59 (+210.53%)
Mutual labels:  asynchronous
erl dist
Rust Implementation of Erlang Distribution Protocol
Stars: ✭ 110 (+478.95%)
Mutual labels:  asynchronous
java-red
Effective Concurrency Modules for Java
Stars: ✭ 25 (+31.58%)
Mutual labels:  asynchronous
easyYoutubeDL
A manager for automating download lists based on youtube-dl
Stars: ✭ 21 (+10.53%)
Mutual labels:  youtube-search
twitch api2
Rust library for talking with the Twitch API aka. "Helix", TMI and more! Use Twitch endpoints fearlessly!
Stars: ✭ 91 (+378.95%)
Mutual labels:  asynchronous
bytecodec
A tiny Rust framework for implementing encoders/decoders of byte-oriented protocols
Stars: ✭ 21 (+10.53%)
Mutual labels:  asynchronous
async-sockets
Library for asynchronous work with sockets based on php streams
Stars: ✭ 45 (+136.84%)
Mutual labels:  asynchronous
WebsocketPromisify
Makes websocket's API just like REST with Promise-like API, with native Promises.
Stars: ✭ 18 (-5.26%)
Mutual labels:  asynchronous
Hunch
Hunch provides functions like: All, First, Retry, Waterfall etc., that makes asynchronous flow control more intuitive.
Stars: ✭ 94 (+394.74%)
Mutual labels:  asynchronous
blackhole
Blackhole is an MTA written on top of asyncio, utilising async and await statements that dumps all mail it receives to /dev/null.
Stars: ✭ 61 (+221.05%)
Mutual labels:  asynchronous
core.horse64.org
THIS IS A MIRROR, CHECK https://codeberg.org/Horse64/core.horse64.org
Stars: ✭ 3 (-84.21%)
Mutual labels:  asynchronous
tgcalls
Voice chats, private incoming and outgoing calls in Telegram for Developers
Stars: ✭ 408 (+2047.37%)
Mutual labels:  asynchronous
torequests
Async wrapper for requests / aiohttp, and some crawler toolkits. Let synchronization code enjoy the performance of asynchronous programming.
Stars: ✭ 22 (+15.79%)
Mutual labels:  asynchronous
ridge
Pure asynchronous PHP implementation of the AMQP 0-9-1 protocol.
Stars: ✭ 49 (+157.89%)
Mutual labels:  asynchronous
aioudp
Asyncio UDP server
Stars: ✭ 21 (+10.53%)
Mutual labels:  asynchronous
Galaxy
Galaxy is an asynchronous parallel visualization ray tracer for performant rendering in distributed computing environments. Galaxy builds upon Intel OSPRay and Intel Embree, including ray queueing and sending logic inspired by TACC GraviT.
Stars: ✭ 18 (-5.26%)
Mutual labels:  asynchronous

ytpy

CodeFactor Downloads pypi-version contributions welcome Discord Badge

Python wrapper to extract youtube data. Simple asynchronous wrapper to get youtube video or playlist data. The purpose of this project is to make it easier for developers to extract data from YouTube.

Requirements

Dependencies

  • urllib
  • aiohttp

Install

pip install --upgrade ytpy

Usage

from ytpy import YoutubeClient
import asyncio
import aiohttp

async def main(loop):
    session = aiohttp.ClientSession()

    client = YoutubeClient(session)
    
    response = await client.search('ringtone')
    print(response)

    await session.close()

loop = asyncio.get_event_loop()
loop.run_until_complete(main(loop))

Search Video by Keywords using YoutubeDataApiV3Client

https://developers.google.com/youtube/v3/docs/search

params:

  • q, string. Search key. default: empty string.
  • part, string. Valid parts: snippet, contentDetails, player, statistics, status. default: snippet.
  • type, string. Valid types: video, playlist, channel.

Example Search method

import os
import asyncio
import aiohttp
from ytpy import YoutubeDataApiV3Client

async def main(loop):
    session = aiohttp.ClientSession()
    
    # Pass the aiohttp client session
    ayt =  YoutubeDataApiV3Client(session, dev_key=os.environ["DEVELOPER_KEY"])
    
    # test search
    results = await ayt.search(q="d&e lost", 
                               search_type="video",
                               max_results=1)
    print(results)

    await session.close()

loop = asyncio.get_event_loop()
loop.run_until_complete(main(loop))
loop.close()

Examples

Check examples for the full code example

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests/examples as appropriate.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].