From 23bf41aaf0f967db83d0b1753a1130bc8a84e841 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joakim=20Hells=C3=A9n?= Date: Fri, 28 Jun 2024 05:17:20 +0200 Subject: [PATCH] Fix some drops not showing --- twitch/management/commands/scrape_twitch.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/twitch/management/commands/scrape_twitch.py b/twitch/management/commands/scrape_twitch.py index c7de4aa..62085e7 100644 --- a/twitch/management/commands/scrape_twitch.py +++ b/twitch/management/commands/scrape_twitch.py @@ -204,7 +204,7 @@ async def insert_data(data: dict) -> None: # noqa: PLR0914 class Command(BaseCommand): help = "Scrape Twitch Drops Campaigns with login using Firefox" - async def run( # noqa: PLR6301 + async def run( # noqa: PLR6301, C901 self, playwright: Playwright, ) -> list[dict[str, typing.Any]]: @@ -270,6 +270,9 @@ class Command(BaseCommand): if "dropCampaign" in campaign.get("data", {}).get("user", {}): await insert_data(campaign) + if "dropCampaigns" in campaign.get("data", {}).get("user", {}): + await insert_data(campaign) + return json_data def handle(self, *args, **kwargs) -> None: # noqa: ANN002, ARG002, ANN003