Giter VIP home page Giter VIP logo

holodex's Introduction

holodex

PyPI version PyPI downloads CodeFactor Github release

Holodex api wrapper

Example

import asyncio
from holodex.client import HolodexClient


async def main():
    async with HolodexClient() as client:
        search = await client.autocomplete("iofi")
        channel_id = search.contents[0].value
        print(channel_id)

        channel = await client.channel(channel_id)
        print(channel.name)
        print(channel.subscriber_count)

        videos = await client.videos_from_channel(channel_id, "videos")
        print(videos.contents[0].title)

        channels = await client.channels(limit=100)

        print(channels[0].name)
        print(channels[0].subscriber_count)


asyncio.run(main())


"""
UCAoy6rzhSf4ydcYjJw3WoVg
Airani Iofifteen Channel hololive-ID
508000
Freetalk dan Terima Kasih Superchat! + Risu OG Song React?!
Nanashi Mumei Ch. hololive-EN
528000
"""

Installation

python -m pip install holodex

holodex's People

Contributors

amashim avatar dependabot[bot] avatar dp0973 avatar ombe1229 avatar restyled-commits avatar saidbysolo avatar swrei avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

holodex's Issues

KeyError: 'start_actual'


> ERROR:asyncio:Task exception was never retrieved
> future: <Task finished name='Task-1' coro=<Loop._loop() done, defined at /app/.heroku/python/lib/python3.10/site-packages/discord/ext/tasks/__init__.py:161> exception=KeyError('start_actual')>

Traceback (most recent call last):
File "/app/.heroku/python/lib/python3.10/site-packages/discord/ext/tasks/__init__.py", line 207, in _loop
raise exc
File "/app/.heroku/python/lib/python3.10/site-packages/discord/ext/tasks/__init__.py", line 178, in _loop
await self.coro(*args, **kwargs)
File "/app/Cog/holodex.py", line 39, in _get_stream
await self.get_stream_method(self.bot.holodex)
File "/app/Cog/holodex.py", line 56, in get_stream_method
await self.confirm_nowgoing_stream(nowgoing_tuple, yt_channel)
File "/app/Cog/holodex.py", line 115, in confirm_nowgoing_stream
actual_start = holodex.time_going(x)
File "/app/Cog/holodex_process.py", line 34, in time_going
actual_start_stamp = x.start_actual.replace(

> File "/app/.heroku/python/lib/python3.10/site-packages/holodex/model/live.py", line 51, in start_actual
> return self._response["start_actual"]
> KeyError: 'start_actual'
> ERROR:asyncio:Unclosed client session
> client_session: <aiohttp.client.ClientSession object at 0x7ff366758be0>

Script:https://github.com/sushi-chaaaan/sakamata-alpha-pycord/blob/stream-cog/Cog/holodex.py#L114

This error is often happen since I updated holodex from 0.9.7 to 0.10.7

'type' is not subscriptable

Screenshot_20220727-024246
In the class HolodexHttpClient
Are
exc_type: Optional[type[BaseException]]

Instead of
exc_type: Optional[type(BaseException)]
In aenter

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.