Added blue and blueType fields into User model (#38)

Co-authored-by: Oleg Sviatchenko <oleg.sviatchenko@sibers.com>
Этот коммит содержится в:
Oleg Sviatchenko 2023-07-23 16:59:46 +06:00 коммит произвёл GitHub
родитель 74594d0b9d
Коммит 95b9a12d47
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23

Просмотреть файл

@ -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"]),
)