cocorum.basehandles
This module provides abstract classes for both cocorum.scraping and cocorum.jsonhandles to use, where their respective abstract classes overlap between the two submodules.
This library does not contain any classes or functions meant to be used directly.
Base handles
Abstract classes for objects with methods that are common between API and HTML versions
Copyright 2026 Wilbur Jaywright d.b.a. Marswide BGL.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
S.D.G.
BaseComment
A comment on a Rumble video
Source code in cocorum/basehandles.py
78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 | |
comment_id_b10
property
The base 10 ID of the comment
comment_id_b36
property
The base 36 ID of the comment
__eq__(other)
Determine if this comment is equal to another.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
other
|
Any
|
Object to compare to. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
Comparison |
bool
|
Did it fit the criteria? |
Source code in cocorum/basehandles.py
101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 | |
__int__()
The comment in integer form (its ID)
Source code in cocorum/basehandles.py
81 82 83 | |
__str__()
The comment as a string (its text)
Source code in cocorum/basehandles.py
85 86 87 | |
delete()
Delete this comment
Source code in cocorum/basehandles.py
136 137 138 139 | |
pin(unpin=False)
Pin or unpin this comment.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
unpin
|
bool
|
If true, unpins instead of pinning comment. |
False
|
Source code in cocorum/basehandles.py
127 128 129 130 131 132 133 134 | |
restore()
Un-delete this comment
Source code in cocorum/basehandles.py
141 142 143 144 | |
BaseContentVotes
Likes and dislikes on a video or comment
Source code in cocorum/basehandles.py
147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 | |
__eq__(other)
Determine if this content votes is equal to another.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
other
|
Any
|
Object to compare to. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
Comparison |
bool
|
Did it fit the criteria? |
Source code in cocorum/basehandles.py
158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 | |
__int__()
The integer form of the content votes
Source code in cocorum/basehandles.py
154 155 156 | |
__repr__()
String to represent this object
Source code in cocorum/basehandles.py
150 151 152 | |
BasePlaylist
A playlist of Rumble videos
Source code in cocorum/basehandles.py
245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 | |
playlist_id_b10
property
The numeric ID of the playlist in base 10
playlist_id_b64
property
The numeric ID of the playlist in base 64
__eq__(other)
Determine if this playlist is equal to another.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
other
|
Any
|
Object to compare to. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
Comparison |
bool
|
Did it fit the criteria? |
Source code in cocorum/basehandles.py
260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 | |
__int__()
The playlist as an integer (it's ID in base 10)
Source code in cocorum/basehandles.py
248 249 250 | |
__repr__()
String to represent this object
Source code in cocorum/basehandles.py
256 257 258 | |
__str__()
The playlist as a string (it's ID in base 64)
Source code in cocorum/basehandles.py
252 253 254 | |
add_video(video_id)
Add a video to this playlist
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
video_id
|
SupportsInt | str
|
The numeric ID of the video to add, in base 10 or 36. |
required |
Source code in cocorum/basehandles.py
297 298 299 300 301 302 303 304 | |
delete()
Delete this playlist
Source code in cocorum/basehandles.py
343 344 345 346 | |
delete_video(video_id)
Remove a video from this playlist
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
video_id
|
SupportsInt | str
|
The numeric ID of the video to remove, in base 10 or 36. |
required |
Source code in cocorum/basehandles.py
306 307 308 309 310 311 312 313 | |
edit(title=None, description=None, visibility=None, channel_id=None)
Edit the details of this playlist. WARNING: The original object will probably be stale after this operation.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
title
|
str
|
The title of the playlist. Defaults to staying the same. |
None
|
description
|
str
|
Describe the playlist. Defaults to staying the same. |
None
|
visibility
|
str
|
Set to public, unlisted, or private via string. Defaults to staying the same. |
None
|
channel_id
|
SupportsInt | str
|
The ID of the channel to have the playlist under. TODO: Cannot be retrieved! Defaults to resetting to None. |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
playlist |
APIPlaylist
|
The edit result. |
Source code in cocorum/basehandles.py
315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 | |
BaseUser
A Rumble user
Source code in cocorum/basehandles.py
185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 | |
user_id_b10
property
The numeric ID of the user in base 10
user_id_b36
property
The numeric ID of the user in base 36
__eq__(other)
Determine if this user is equal to another.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
other
|
Any
|
Object to compare to. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
Comparison |
bool
|
Did it fit the criteria? |
Source code in cocorum/basehandles.py
192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 | |
__int__()
The user as an integer (it's ID in base 10)
Source code in cocorum/basehandles.py
188 189 190 | |
mute(duration=None, total=False)
Mute this user.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
duration
|
int
|
How long to mute the user in seconds. Defaults to infinite. |
None
|
total
|
bool
|
Wether or not they are muted across all videos. Defaults to False, just this video. |
False
|
Source code in cocorum/basehandles.py
228 229 230 231 232 233 234 235 236 237 238 | |
unmute()
Unmute this user.
Source code in cocorum/basehandles.py
240 241 242 | |
BaseUserBadge
A badge on a username
Source code in cocorum/basehandles.py
32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 | |
icon
property
The badge's icon as a bytestring
__eq__(other)
Check if this badge is equal to another.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
other
|
Any
|
Object to compare to. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
Comparison |
bool
|
Did it fit the criteria? |
Source code in cocorum/basehandles.py
35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 | |
__repr__()
String to represent this object
Source code in cocorum/basehandles.py
59 60 61 | |
__str__()
The chat user badge in string form
Source code in cocorum/basehandles.py
55 56 57 | |
S.D.G.