From 95b9a12d47e45177fa5c276e89a965bc21b16a3f Mon Sep 17 00:00:00 2001 From: Oleg Sviatchenko Date: Sun, 23 Jul 2023 16:59:46 +0600 Subject: [PATCH] Added blue and blueType fields into User model (#38) Co-authored-by: Oleg Sviatchenko --- twscrape/models.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/twscrape/models.py b/twscrape/models.py index 1ff7048..f506851 100644 --- a/twscrape/models.py +++ b/twscrape/models.py @@ -109,6 +109,8 @@ class User(JSONTrait): profileBannerUrl: str | None = None protected: bool | None = None verified: bool | None = None + blue: bool | None = None + blueType: str | None = None descriptionLinks: list[TextLink] = field(default_factory=list) _type: str = "snscrape.modules.twitter.User" @@ -136,6 +138,8 @@ class User(JSONTrait): profileImageUrl=obj["profile_image_url_https"], profileBannerUrl=obj.get("profile_banner_url"), verified=obj.get("verified"), + blue=obj.get("is_blue_verified"), + blueType=obj.get("verified_type"), protected=obj.get("protected"), descriptionLinks=_parse_links(obj, ["entities.description.urls", "entities.url.urls"]), )