crash.software
Projects
Pull Requests
Issues
Builds
snscrape
Code
Files
Commits
Branches
Tags
Pull Requests
Code Comments
Code Compare
Issues
List
Boards
Milestones
Builds
Statistics
Contributions
Source Lines
Child Projects
Projects
STRLCPY
snscrape
Commits
3870282a
🤬
Sign In
Fix broadcast and event card crashes
JustAnotherArchivist
committed
2 years ago
3870282a
1 parent
7c0fcdec
Revision indexing in progress... (symbol navigation in revisions will be accurate after indexed)
Total 1 files
■ ■ ■
■ ■ ■
snscrape/modules/twitter.py
skipped 196 lines
197
197
id: str
198
198
url: str
199
199
title: str
200
-
state: str
201
-
source: str
202
-
thumbnailUrl: str
203
-
broadcaster: 'User'
200
+
state: typing.Optional[str] = None
201
+
broadcaster: typing.Optional['User'] = None
202
+
thumbnailUrl:
typing
.
Optional
[
str
]
=
None
203
+
source: typing.Optional[str] = None
204
204
siteUser: typing.Optional['User'] = None
205
205
206
206
skipped 19 lines
226
226
@dataclasses.dataclass
227
227
class Event:
228
228
id: int
229
-
title: str
230
229
category: str
231
230
photo: Photo
231
+
title: typing.Optional[str] = None
232
232
description: typing.Optional[str] = None
233
233
234
234
@property
skipped 801 lines
1036
1036
elif cardName == '745291183405076480:live_event':
1037
1037
kwargs = _kwargs_from_map({'event_id': 'id', 'event_title': 'title', 'event_category': 'category', 'event_subtitle': 'description'})
1038
1038
kwargs['id'] = int(kwargs['id'])
1039
-
kwargs['photo'] = Photo(previewUrl = bindingValues['event_thumbnail_small'], fullUrl = bindingValues['
event_thumbnail_original
'])
1039
+
kwargs['photo'] = Photo(previewUrl = bindingValues['event_thumbnail_small'], fullUrl = bindingValues
.
get
(
'
event_thumbnail_original
'
)
or
bindingValues
['
event_thumbnail
'])
1040
1040
return EventCard(event = Event(**kwargs))
1041
1041
elif cardName == '3337203208:newsletter_publication':
1042
1042
kwargs = _kwargs_from_map({'newsletter_title': 'title', 'newsletter_description': 'description', 'newsletter_image_original': 'imageUrl', 'card_url': 'url', 'revue_account_id': 'revueAccountId', 'issue_count': 'issueCount'})
skipped 629 lines
All occurrences
Please wait...
Page is in error, reload to recover