Fix some drops not showing
This commit is contained in:
		| @@ -204,7 +204,7 @@ async def insert_data(data: dict) -> None:  # noqa: PLR0914 | |||||||
| class Command(BaseCommand): | class Command(BaseCommand): | ||||||
|     help = "Scrape Twitch Drops Campaigns with login using Firefox" |     help = "Scrape Twitch Drops Campaigns with login using Firefox" | ||||||
|  |  | ||||||
|     async def run(  # noqa: PLR6301 |     async def run(  # noqa: PLR6301, C901 | ||||||
|         self, |         self, | ||||||
|         playwright: Playwright, |         playwright: Playwright, | ||||||
|     ) -> list[dict[str, typing.Any]]: |     ) -> list[dict[str, typing.Any]]: | ||||||
| @@ -270,6 +270,9 @@ class Command(BaseCommand): | |||||||
|             if "dropCampaign" in campaign.get("data", {}).get("user", {}): |             if "dropCampaign" in campaign.get("data", {}).get("user", {}): | ||||||
|                 await insert_data(campaign) |                 await insert_data(campaign) | ||||||
|  |  | ||||||
|  |             if "dropCampaigns" in campaign.get("data", {}).get("user", {}): | ||||||
|  |                 await insert_data(campaign) | ||||||
|  |  | ||||||
|         return json_data |         return json_data | ||||||
|  |  | ||||||
|     def handle(self, *args, **kwargs) -> None:  # noqa: ANN002, ARG002, ANN003 |     def handle(self, *args, **kwargs) -> None:  # noqa: ANN002, ARG002, ANN003 | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user