From 7dce2003c84542e3676fc31c3edc49eb10ba7739 Mon Sep 17 00:00:00 2001 From: Billy Huang <10646003@ntub.edu.tw> Date: Thu, 11 Apr 2024 15:18:27 +0800 Subject: [PATCH 01/13] fix: update folder name to prevent conflict ImportError: cannot import name 'Chzzk' from partially initialized module 'chzzk' (most likely due to a circular import) --- chzzk/__init__.py | 4 ---- python_chzzk/__init__.py | 4 ++++ {chzzk => python_chzzk}/chzzk.py | 4 ++-- {chzzk => python_chzzk}/client.py | 2 +- {chzzk => python_chzzk}/errors.py | 0 {chzzk => python_chzzk}/models.py | 2 +- {chzzk => python_chzzk}/utils.py | 0 run.py | 4 ++-- setup.cfg | 4 ++-- 9 files changed, 12 insertions(+), 12 deletions(-) delete mode 100644 chzzk/__init__.py create mode 100644 python_chzzk/__init__.py rename {chzzk => python_chzzk}/chzzk.py (96%) rename {chzzk => python_chzzk}/client.py (98%) rename {chzzk => python_chzzk}/errors.py (100%) rename {chzzk => python_chzzk}/models.py (99%) rename {chzzk => python_chzzk}/utils.py (100%) diff --git a/chzzk/__init__.py b/chzzk/__init__.py deleted file mode 100644 index dd60252..0000000 --- a/chzzk/__init__.py +++ /dev/null @@ -1,4 +0,0 @@ -from chzzk.chzzk import Chzzk -from chzzk.client import Credential - -__version__ = "0.0.3" diff --git a/python_chzzk/__init__.py b/python_chzzk/__init__.py new file mode 100644 index 0000000..83a14a5 --- /dev/null +++ b/python_chzzk/__init__.py @@ -0,0 +1,4 @@ +from python_chzzk.chzzk import Chzzk +from python_chzzk.client import Credential + +__version__ = "0.0.3" diff --git a/chzzk/chzzk.py b/python_chzzk/chzzk.py similarity index 96% rename from chzzk/chzzk.py rename to python_chzzk/chzzk.py index 6fb80db..658a42e 100644 --- a/chzzk/chzzk.py +++ b/python_chzzk/chzzk.py @@ -1,7 +1,7 @@ from typing import Optional -from chzzk.client import ChzzkClient, Credential, GameClient -from chzzk.models import ( +from python_chzzk.client import ChzzkClient, Credential, GameClient +from python_chzzk.models import ( Channel, ChannelSearchRecord, LiveDetail, diff --git a/chzzk/client.py b/python_chzzk/client.py similarity index 98% rename from chzzk/client.py rename to python_chzzk/client.py index 363b1aa..f636a85 100644 --- a/chzzk/client.py +++ b/python_chzzk/client.py @@ -4,7 +4,7 @@ import httpx -from chzzk.errors import ChzzkHTTPError +from python_chzzk.errors import ChzzkHTTPError @dataclass diff --git a/chzzk/errors.py b/python_chzzk/errors.py similarity index 100% rename from chzzk/errors.py rename to python_chzzk/errors.py diff --git a/chzzk/models.py b/python_chzzk/models.py similarity index 99% rename from chzzk/models.py rename to python_chzzk/models.py index 7b98d56..0ee91e7 100644 --- a/chzzk/models.py +++ b/python_chzzk/models.py @@ -6,7 +6,7 @@ from pydantic import AfterValidator, BaseModel, ConfigDict, Field, Json from pydantic.alias_generators import to_camel -from chzzk.utils import as_kst, to_kst +from python_chzzk.utils import as_kst, to_kst T = TypeVar("T", bound="SearchRecord") diff --git a/chzzk/utils.py b/python_chzzk/utils.py similarity index 100% rename from chzzk/utils.py rename to python_chzzk/utils.py diff --git a/run.py b/run.py index e7fdd91..a93ceaf 100644 --- a/run.py +++ b/run.py @@ -1,7 +1,7 @@ import asyncio -from chzzk import Chzzk -from chzzk.client import Credential +from python_chzzk import Chzzk +from python_chzzk.client import Credential async def main(): diff --git a/setup.cfg b/setup.cfg index 347c40c..644580a 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,6 +1,6 @@ [metadata] name = python-chzzk -version = attr: chzzk.__version__ +version = attr: python_chzzk.__version__ description = An unofficial Python library for CHZZK author = Jonghwan Hyeon author_email = jonghwanhyeon93@gmail.com @@ -22,4 +22,4 @@ install_requires = pydantic typing-extensions python_requires = >=3.8 -packages = find: \ No newline at end of file +packages = find: From a0309f23c9eb4a85f5d4ba6f7287c22badec1115 Mon Sep 17 00:00:00 2001 From: Billy Huang <10646003@ntub.edu.tw> Date: Thu, 11 Apr 2024 15:59:39 +0800 Subject: [PATCH 02/13] fix(run): Credential attributes didn't have prefix nid --- run.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/run.py b/run.py index a93ceaf..8420ebf 100644 --- a/run.py +++ b/run.py @@ -7,8 +7,8 @@ async def main(): chzzk = Chzzk( Credential( - nid_auth="w3kvHDBy7+B/rvaPGcvusyp3IvunbtJWQIfZOAX1mSvisgMNBUg6vo320DGmUqSw", - nid_session="AAABqzuRWjsdfaZDf66Ms4LhTZnbF7spL+AJqDKrZK4KAe/BtW81A/3Dyhi2TXQTh91uRVwpp4HcK5GWOY9ALLA70RDoLZOfetD9TZA0yTHL1Bkj9H+/M5INXHY7IdWgWrNiqa2MFovzrhPmCQc6/i4dbUp8grnYgt+JlWnWTQajxqvkYfnTqbsdnHYRtjCrCGJvkAT15jk/x6kOWQwFo14WHV8noduFR+xHciawMFF4uwnheKiQxTWrUNadVXjivwMp/ofsCKr9C2BNrLmPhuRpJ0O103HKiVn1TlWj95u2sUvWIED2ivpRLR7yAUKaxGzbeWe6n3GuRkL24B43mRWQ9KVKdURIGzbuBNeVkBuXj+OoWEhCWrySD18bVyaiIKcV3o603rh16Mde3ceOFk69Q/ZGiO5GTovbUyUH1B3EOhwbUD3qzV18n3AuoPWEIsSfD/MjCwl8UHA78IbM6l9BdeMETvlkT/rCJsOi7bdENzNPVdSmH+6YrYrZ6g6eJZnZZZ76iIUCAbuzQg5+u3c824lXTi3RbIPlZtYX9RdZmdu/On9TfAILALnuxamlMrRbTA==", + auth="w3kvHDBy7+B/rvaPGcvusyp3IvunbtJWQIfZOAX1mSvisgMNBUg6vo320DGmUqSw", + session="AAABqzuRWjsdfaZDf66Ms4LhTZnbF7spL+AJqDKrZK4KAe/BtW81A/3Dyhi2TXQTh91uRVwpp4HcK5GWOY9ALLA70RDoLZOfetD9TZA0yTHL1Bkj9H+/M5INXHY7IdWgWrNiqa2MFovzrhPmCQc6/i4dbUp8grnYgt+JlWnWTQajxqvkYfnTqbsdnHYRtjCrCGJvkAT15jk/x6kOWQwFo14WHV8noduFR+xHciawMFF4uwnheKiQxTWrUNadVXjivwMp/ofsCKr9C2BNrLmPhuRpJ0O103HKiVn1TlWj95u2sUvWIED2ivpRLR7yAUKaxGzbeWe6n3GuRkL24B43mRWQ9KVKdURIGzbuBNeVkBuXj+OoWEhCWrySD18bVyaiIKcV3o603rh16Mde3ceOFk69Q/ZGiO5GTovbUyUH1B3EOhwbUD3qzV18n3AuoPWEIsSfD/MjCwl8UHA78IbM6l9BdeMETvlkT/rCJsOi7bdENzNPVdSmH+6YrYrZ6g6eJZnZZZ76iIUCAbuzQg5+u3c824lXTi3RbIPlZtYX9RdZmdu/On9TfAILALnuxamlMrRbTA==", ) ) From 1aba07e63d76874969177c35e474ecf557014003 Mon Sep 17 00:00:00 2001 From: Billy Huang <10646003@ntub.edu.tw> Date: Thu, 11 Apr 2024 15:36:28 +0800 Subject: [PATCH 03/13] fix(client): HTTPClient headers add user agent to prevent chzzk api robot checking --- python_chzzk/client.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/python_chzzk/client.py b/python_chzzk/client.py index f636a85..a831c33 100644 --- a/python_chzzk/client.py +++ b/python_chzzk/client.py @@ -27,6 +27,9 @@ def __init__(self, credential: Optional[Credential] = None): self._credential = credential self._client = httpx.AsyncClient() + self._headers = { + 'user-agent': 'Chrome/123.0.0.0', + } if self._credential is not None: self._client.cookies.update(self._credential.as_cookie()) @@ -43,6 +46,7 @@ async def request( response = await self._client.request( method=method, url=urljoin(self.BASE_URL, url), + headers=self._headers, params=params, data=data, **kwargs, From 3f5d45ca3a162d92767c82550fab539c69a2f628 Mon Sep 17 00:00:00 2001 From: Billy Huang <10646003@ntub.edu.tw> Date: Thu, 11 Apr 2024 15:57:58 +0800 Subject: [PATCH 04/13] fix(models): update channel model --- python_chzzk/models.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/python_chzzk/models.py b/python_chzzk/models.py index 0ee91e7..8b5f6a1 100644 --- a/python_chzzk/models.py +++ b/python_chzzk/models.py @@ -42,12 +42,19 @@ class PersonalData(RawModel): following: Optional[Following] = None +class SubscriptionPaymentAvailability(RawModel): + iap_availability: bool + iab_availability: bool + + class PartialChannel(RawModel): channel_id: Optional[str] = None channel_name: str channel_image_url: Optional[str] = None verified_mark: bool personal_data: Optional[PersonalData] = None + subscription_availability: Optional[bool] = None + subscription_payment_availability: Optional[SubscriptionPaymentAvailability] = None class Channel(PartialChannel): From 54ae1422dcc86b8bea56d2d29735b91135c447e1 Mon Sep 17 00:00:00 2001 From: Billy Huang <10646003@ntub.edu.tw> Date: Thu, 11 Apr 2024 18:06:37 +0800 Subject: [PATCH 05/13] fix(models): update video model --- python_chzzk/models.py | 1 + 1 file changed, 1 insertion(+) diff --git a/python_chzzk/models.py b/python_chzzk/models.py index 8b5f6a1..a126ac8 100644 --- a/python_chzzk/models.py +++ b/python_chzzk/models.py @@ -207,6 +207,7 @@ class VideoMetadata(RawModel): read_count: int channel_id: Optional[str] = None publish_date_at: Annotated[datetime, AfterValidator(as_kst)] + adult: bool category_type: Optional[str] = None video_category: str video_category_value: str From 5cfa9e09b62ab8d2984914ff0df2dddc2a8095b8 Mon Sep 17 00:00:00 2001 From: Billy Huang <10646003@ntub.edu.tw> Date: Thu, 11 Apr 2024 18:06:50 +0800 Subject: [PATCH 06/13] fix(models): update live model --- python_chzzk/models.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/python_chzzk/models.py b/python_chzzk/models.py index a126ac8..975f2b5 100644 --- a/python_chzzk/models.py +++ b/python_chzzk/models.py @@ -98,7 +98,8 @@ class LivePlaybackMeta(RawModel): live_id: str paid_live: bool cdn_info: LivePlaybackMetaCDNInfo - p2p: bool = Field(alias="p2p") + # p2p: bool = Field(alias="p2p") + cmcd_enabled: bool class LivePlaybackServiceMeta(RawModel): @@ -170,12 +171,13 @@ class LivePlayback(RawModel): class Live(RawModel): live_title: str - live_image_url: str + live_image_url: Optional[str] default_thumbnail_image_url: Optional[str] = None concurrent_user_count: int accumulate_count: int open_date: Annotated[datetime, AfterValidator(to_kst)] live_id: int + adult: bool chat_channel_id: str category_type: Optional[str] = None live_category: Optional[str] = None From 0cf950deeeafcd195bec195649357da1b8426377 Mon Sep 17 00:00:00 2001 From: Billy Huang <10646003@ntub.edu.tw> Date: Thu, 11 Apr 2024 18:31:05 +0800 Subject: [PATCH 07/13] fix(chzzk): update live status url and model --- python_chzzk/chzzk.py | 2 +- python_chzzk/models.py | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/python_chzzk/chzzk.py b/python_chzzk/chzzk.py index 658a42e..3c8347d 100644 --- a/python_chzzk/chzzk.py +++ b/python_chzzk/chzzk.py @@ -19,7 +19,7 @@ def __init__(self, client: ChzzkClient): self._client = client async def status(self, channel_id: str) -> LiveStatus: - response = await self._client.get(f"polling/v1/channels/{channel_id}/live-status") + response = await self._client.get(f"polling/v2/channels/{channel_id}/live-status") return LiveStatus(**response) async def detail(self, channel_id: str) -> LiveDetail: diff --git a/python_chzzk/models.py b/python_chzzk/models.py index 975f2b5..a7619d0 100644 --- a/python_chzzk/models.py +++ b/python_chzzk/models.py @@ -85,6 +85,12 @@ class LiveStatus(RawModel): live_category_value: str live_polling_status: Json[LivePollingStatus] = Field(alias="livePollingStatusJson") fault_status: Any + user_adult_status: Optional[str] + chat_active: bool + chat_available_group: str + chat_available_condition: str + min_follower_minute: int + chat_donation_ranking_exposure: bool class LivePlaybackMetaCDNInfo(RawModel): From 815daf2a932bc680dedb0684d7837360bf3ccb0e Mon Sep 17 00:00:00 2001 From: Billy Huang <10646003@ntub.edu.tw> Date: Thu, 11 Apr 2024 18:31:20 +0800 Subject: [PATCH 08/13] fix(chzzk): update live detail url and model --- python_chzzk/chzzk.py | 2 +- python_chzzk/models.py | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/python_chzzk/chzzk.py b/python_chzzk/chzzk.py index 3c8347d..92946b3 100644 --- a/python_chzzk/chzzk.py +++ b/python_chzzk/chzzk.py @@ -23,7 +23,7 @@ async def status(self, channel_id: str) -> LiveStatus: return LiveStatus(**response) async def detail(self, channel_id: str) -> LiveDetail: - response = await self._client.get(f"service/v1/channels/{channel_id}/live-detail") + response = await self._client.get(f"service/v2/channels/{channel_id}/live-detail") return LiveDetail(**response) diff --git a/python_chzzk/models.py b/python_chzzk/models.py index a7619d0..cd5312b 100644 --- a/python_chzzk/models.py +++ b/python_chzzk/models.py @@ -202,6 +202,9 @@ class LiveDetail(Live): min_follower_minute: int channel: PartialChannel live_polling_status: Json[LivePollingStatus] = Field(alias="livePollingStatusJson") + p2p_quality: list[Any] = Field(alias="p2pQuality") + user_adult_status: Optional[str] + chat_donation_ranking_exposure: bool class VideoMetadata(RawModel): From c124a6592af3e885e4cf9dea648e463299c8c635 Mon Sep 17 00:00:00 2001 From: Billy Huang <10646003@ntub.edu.tw> Date: Thu, 11 Apr 2024 18:40:14 +0800 Subject: [PATCH 09/13] fix(chzzk): update video url and live detail model --- python_chzzk/chzzk.py | 2 +- python_chzzk/models.py | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/python_chzzk/chzzk.py b/python_chzzk/chzzk.py index 92946b3..a4d6c07 100644 --- a/python_chzzk/chzzk.py +++ b/python_chzzk/chzzk.py @@ -89,7 +89,7 @@ async def channel(self, id: str) -> Channel: return Channel(**response) async def video(self, no: int) -> Video: - response = await self._client.get(f"service/v1/videos/{no}") + response = await self._client.get(f"service/v2/videos/{no}") return Video(**response) diff --git a/python_chzzk/models.py b/python_chzzk/models.py index cd5312b..145395a 100644 --- a/python_chzzk/models.py +++ b/python_chzzk/models.py @@ -227,6 +227,7 @@ class VideoMetadata(RawModel): class PartialVideo(VideoMetadata): trailer_url: Optional[str] = None exposure: bool + video_category: Optional[str] channel: PartialChannel @@ -235,6 +236,7 @@ class Video(PartialVideo): in_key: str live_open_date: Annotated[datetime, AfterValidator(to_kst)] vod_status: str + user_adult_status: Optional[str] prev_video: Optional[PartialVideo] = None next_video: Optional[PartialVideo] = None From 797105e3050d6edf6f8a4883a624683676ce0be7 Mon Sep 17 00:00:00 2001 From: Billy Huang <10646003@ntub.edu.tw> Date: Thu, 11 Apr 2024 18:45:51 +0800 Subject: [PATCH 10/13] feat(run): update with README usage --- run.py | 25 +++++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) diff --git a/run.py b/run.py index 8420ebf..e11c5ce 100644 --- a/run.py +++ b/run.py @@ -5,15 +5,28 @@ async def main(): - chzzk = Chzzk( - Credential( - auth="w3kvHDBy7+B/rvaPGcvusyp3IvunbtJWQIfZOAX1mSvisgMNBUg6vo320DGmUqSw", - session="AAABqzuRWjsdfaZDf66Ms4LhTZnbF7spL+AJqDKrZK4KAe/BtW81A/3Dyhi2TXQTh91uRVwpp4HcK5GWOY9ALLA70RDoLZOfetD9TZA0yTHL1Bkj9H+/M5INXHY7IdWgWrNiqa2MFovzrhPmCQc6/i4dbUp8grnYgt+JlWnWTQajxqvkYfnTqbsdnHYRtjCrCGJvkAT15jk/x6kOWQwFo14WHV8noduFR+xHciawMFF4uwnheKiQxTWrUNadVXjivwMp/ofsCKr9C2BNrLmPhuRpJ0O103HKiVn1TlWj95u2sUvWIED2ivpRLR7yAUKaxGzbeWe6n3GuRkL24B43mRWQ9KVKdURIGzbuBNeVkBuXj+OoWEhCWrySD18bVyaiIKcV3o603rh16Mde3ceOFk69Q/ZGiO5GTovbUyUH1B3EOhwbUD3qzV18n3AuoPWEIsSfD/MjCwl8UHA78IbM6l9BdeMETvlkT/rCJsOi7bdENzNPVdSmH+6YrYrZ6g6eJZnZZZ76iIUCAbuzQg5+u3c824lXTi3RbIPlZtYX9RdZmdu/On9TfAILALnuxamlMrRbTA==", - ) + credential = Credential( + auth="w3kvHDBy7+B/rvaPGcvusyp3IvunbtJWQIfZOAX1mSvisgMNBUg6vo320DGmUqSw", + session="AAABqzuRWjsdfaZDf66Ms4LhTZnbF7spL+AJqDKrZK4KAe/BtW81A/3Dyhi2TXQTh91uRVwpp4HcK5GWOY9ALLA70RDoLZOfetD9TZA0yTHL1Bkj9H+/M5INXHY7IdWgWrNiqa2MFovzrhPmCQc6/i4dbUp8grnYgt+JlWnWTQajxqvkYfnTqbsdnHYRtjCrCGJvkAT15jk/x6kOWQwFo14WHV8noduFR+xHciawMFF4uwnheKiQxTWrUNadVXjivwMp/ofsCKr9C2BNrLmPhuRpJ0O103HKiVn1TlWj95u2sUvWIED2ivpRLR7yAUKaxGzbeWe6n3GuRkL24B43mRWQ9KVKdURIGzbuBNeVkBuXj+OoWEhCWrySD18bVyaiIKcV3o603rh16Mde3ceOFk69Q/ZGiO5GTovbUyUH1B3EOhwbUD3qzV18n3AuoPWEIsSfD/MjCwl8UHA78IbM6l9BdeMETvlkT/rCJsOi7bdENzNPVdSmH+6YrYrZ6g6eJZnZZZ76iIUCAbuzQg5+u3c824lXTi3RbIPlZtYX9RdZmdu/On9TfAILALnuxamlMrRbTA==", ) + chzzk = Chzzk(credential) + print('me:') print(await chzzk.me()) - print(await chzzk.channel("bb382c2c0cc9fa7c86ab3b037fb5799c")) + print('channel:') + print(await chzzk.channel("bdc57cc4217173f0e89f63fba2f1c6e5")) + print('video:') + print(await chzzk.video(1794)) + print('search channels:') + print(await chzzk.search.channels("풍월량")) + print('search videos:') + print(await chzzk.search.videos("자낳대")) + print('search lives:') + print(await chzzk.search.lives("타르코프")) + print('live status:') + print(await chzzk.live.status(channel_id="22bd842599735ae19e454983280f611e")) + print('live detail:') + print(await chzzk.live.detail(channel_id="22bd842599735ae19e454983280f611e")) if __name__ == "__main__": From 870baf8dabc4a87def35e8815ed92674d3086589 Mon Sep 17 00:00:00 2001 From: Billy Huang <10646003@ntub.edu.tw> Date: Thu, 11 Apr 2024 15:48:16 +0800 Subject: [PATCH 11/13] feat: update version to 0.0.4 --- python_chzzk/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python_chzzk/__init__.py b/python_chzzk/__init__.py index 83a14a5..f1b3617 100644 --- a/python_chzzk/__init__.py +++ b/python_chzzk/__init__.py @@ -1,4 +1,4 @@ from python_chzzk.chzzk import Chzzk from python_chzzk.client import Credential -__version__ = "0.0.3" +__version__ = "0.0.4" From 73d45b26b1a5d23b0680823e3a1965b39cf62b65 Mon Sep 17 00:00:00 2001 From: Billy Huang <10646003@ntub.edu.tw> Date: Fri, 12 Apr 2024 11:13:10 +0800 Subject: [PATCH 12/13] revert(chzzk): downgrade api version to v1 --- python_chzzk/chzzk.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/python_chzzk/chzzk.py b/python_chzzk/chzzk.py index a4d6c07..658a42e 100644 --- a/python_chzzk/chzzk.py +++ b/python_chzzk/chzzk.py @@ -19,11 +19,11 @@ def __init__(self, client: ChzzkClient): self._client = client async def status(self, channel_id: str) -> LiveStatus: - response = await self._client.get(f"polling/v2/channels/{channel_id}/live-status") + response = await self._client.get(f"polling/v1/channels/{channel_id}/live-status") return LiveStatus(**response) async def detail(self, channel_id: str) -> LiveDetail: - response = await self._client.get(f"service/v2/channels/{channel_id}/live-detail") + response = await self._client.get(f"service/v1/channels/{channel_id}/live-detail") return LiveDetail(**response) @@ -89,7 +89,7 @@ async def channel(self, id: str) -> Channel: return Channel(**response) async def video(self, no: int) -> Video: - response = await self._client.get(f"service/v2/videos/{no}") + response = await self._client.get(f"service/v1/videos/{no}") return Video(**response) From dfbae397d66e4918347de9bb294e1aac989c1895 Mon Sep 17 00:00:00 2001 From: Billy Huang <10646003@ntub.edu.tw> Date: Sat, 13 Apr 2024 00:13:31 +0800 Subject: [PATCH 13/13] style: replace single quotes to double quotes --- python_chzzk/client.py | 2 +- run.py | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/python_chzzk/client.py b/python_chzzk/client.py index a831c33..fc57d0b 100644 --- a/python_chzzk/client.py +++ b/python_chzzk/client.py @@ -28,7 +28,7 @@ def __init__(self, credential: Optional[Credential] = None): self._credential = credential self._client = httpx.AsyncClient() self._headers = { - 'user-agent': 'Chrome/123.0.0.0', + "user-agent": "Chrome/123.0.0.0", } if self._credential is not None: diff --git a/run.py b/run.py index e11c5ce..77628a5 100644 --- a/run.py +++ b/run.py @@ -11,21 +11,21 @@ async def main(): ) chzzk = Chzzk(credential) - print('me:') + print("me:") print(await chzzk.me()) - print('channel:') + print("channel:") print(await chzzk.channel("bdc57cc4217173f0e89f63fba2f1c6e5")) - print('video:') + print("video:") print(await chzzk.video(1794)) - print('search channels:') + print("search channels:") print(await chzzk.search.channels("풍월량")) - print('search videos:') + print("search videos:") print(await chzzk.search.videos("자낳대")) - print('search lives:') + print("search lives:") print(await chzzk.search.lives("타르코프")) - print('live status:') + print("live status:") print(await chzzk.live.status(channel_id="22bd842599735ae19e454983280f611e")) - print('live detail:') + print("live detail:") print(await chzzk.live.detail(channel_id="22bd842599735ae19e454983280f611e"))