cocorum.static
This module provides static global data for use across the package, organized as class attributes. You may very well find a lot of these values useful directly as well.
Cocorum static variable definitions
Provides various data that, if changed, would need to change globally.
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.
Delays
Various times for delays and waits
Source code in cocorum/static.py
125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 | |
api_refresh_default = 10
class-attribute
instance-attribute
How long to reuse old data from the main API, in seconds
api_refresh_minimum = 5
class-attribute
instance-attribute
Minimum refresh rate for the main API, as defined by Rumble
request_timeout = Timeout(5, 15)
class-attribute
instance-attribute
Timeout object for generic network requests
sse_connect_timeout = 10
class-attribute
instance-attribute
How long to wait for the chat SSE connection to be established, in seconds
sse_read_timeout = 90
class-attribute
instance-attribute
How long to wait for the next chat SSE bytes before reconnecting, in seconds.
Silence this long is not treated as the chat ending. The client reconnects, and HTTP 204 on that connection means the livestream chat is over.
sse_reconnect_delay = 2
class-attribute
instance-attribute
How long to wait before reconnecting the chat SSE stream, in seconds
upload_request_timeout = 300
class-attribute
instance-attribute
How long to wait before giving up on a video chunk upload, in seconds
Message
For chat messages
Source code in cocorum/static.py
154 155 156 157 158 159 160 161 162 163 164 | |
command_prefix = '/'
class-attribute
instance-attribute
Prefix Rumble uses for native command
max_len = 200
class-attribute
instance-attribute
Maximum chat message length
send_cooldown = 3
class-attribute
instance-attribute
How long to wait between sending messages
Misc
No idea where else to put this data
Source code in cocorum/static.py
180 181 182 183 184 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 | |
badge_icon_size = '48'
class-attribute
instance-attribute
Size of chat badge icons to retrieve, only valid one has long been the string 48
badges_as_glyphs = {'verified': '✅', 'admin': '👑', 'moderator': '🛡', 'premium': '🗲', 'locals': '♖', 'recurring_subscription': '♖', 'locals_supporter': '⛋', 'whale-grey': '🐳', 'whale-yellow': '🐳', 'whale-blue': '🐳'}
class-attribute
instance-attribute
Dictionary of badge slugs mapped to UTF-8 glyphs, for end-user convenience
base36 = '0123456789abcdefghijklmnopqrstuvwxyz'
class-attribute
instance-attribute
Digits of the numerical base 36 that Rumble uses
find_acc_apikey = re.compile('(?<=var \\$a = new Account\\("AccountOverview",").*(?="\\);)')
class-attribute
instance-attribute
RegEx to find the account API key in the https://rumble.com/account page source
It looks like this: var $a = new Account("AccountContent","##########");
session_token_key = 'u_s'
class-attribute
instance-attribute
Key of the session token within the session cookie dict
tag_split = ', '
class-attribute
instance-attribute
Characters that video tags are separated by
text_encoding = 'utf-8'
class-attribute
instance-attribute
Encoding for all text-bytes conversions
timestamp_format = '%Y-%m-%dT%H:%M:%S%z'
class-attribute
instance-attribute
Rumble's timestamp format in ISO 8601 designations
video_edit_success = 'Your changes have been saved!<br>Please allow up to 30 seconds for them to take effect.'
class-attribute
instance-attribute
Message that Rumble shows (in HTML) upon successful video edit
ContentTypes
Types of content that can be rumbled on
Source code in cocorum/static.py
224 225 226 227 228 229 230 231 | |
comment = 2
class-attribute
instance-attribute
A comment
video = 1
class-attribute
instance-attribute
A video or livestream
RequestHeaders
Headers for various HTTPrequests
Source code in cocorum/static.py
41 42 43 44 45 46 47 | |
user_agent = {'User-Agent': f'{PACKAGE_NAME}/{__version__} (+{HOMEPAGE})'}
class-attribute
instance-attribute
Header with an honest user-agent string
StaticAPIEndpoints
API endpoints that don't change and shouldn't trigger a refresh
Source code in cocorum/static.py
50 51 52 53 54 55 56 57 58 59 60 61 62 | |
main = ['user_id', 'username', 'channel_id', 'channel_name']
class-attribute
instance-attribute
Endpoints of the main API
stream = ['id', 'created_on']
class-attribute
instance-attribute
Endpoints of the stream subobject
URI
URIs to various Rumble services
Source code in cocorum/static.py
73 74 75 76 77 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 | |
acc_settings_page = account_page + '/settings'
class-attribute
instance-attribute
Account settings page, where lots of user info is stored
account_page = rumble_base + '/account'
class-attribute
instance-attribute
Account page
channels_page = rumble_base + '/user/{username}/channels'
class-attribute
instance-attribute
Channels under a user, format with username
login_test = rumble_base + '/-htmx/web-services/user-login'
class-attribute
instance-attribute
Test the session token by sending it here and checking the status code (409 is valid token)
mutes_page = rumble_base + '/account/moderation/muting?pg={page}'
class-attribute
instance-attribute
Webpage with all the mutes on it, format with page number
playlists_page = rumble_base + '/my-library/playlists'
class-attribute
instance-attribute
The logged-in user's playlist page
rls_api_keys_page = rumble_base + '/account/livestream-api'
class-attribute
instance-attribute
Live Stream API key management, with the keys for viewing
rumble_base = 'https://rumble.com'
class-attribute
instance-attribute
Base URL to Rumble's website, for URLs that are relative to it
rumbot_suffix = '/api/ls'
class-attribute
instance-attribute
RumBot passthrough API ending
servicephp = rumble_base + '/service.php'
class-attribute
instance-attribute
The Service.PHP API
uploadphp = rumble_base + '/upload.php'
class-attribute
instance-attribute
The video upload PHP
ChatAPI
URIs of the chat API
Source code in cocorum/static.py
109 110 111 112 113 114 115 116 117 118 119 120 121 122 | |
base = 'https://web7.rumble.com/chat/api/chat/{stream_id_b10}'
class-attribute
instance-attribute
Rumble's internal chat URL for a stream, format this string with a stream_id_b10
command = 'https://rumble.com/chat/command'
class-attribute
instance-attribute
Chat commands (does not use the base)
message = base + '/message'
class-attribute
instance-attribute
Message actions
sse_stream = base + '/stream'
class-attribute
instance-attribute
SSE stream of chat events
Upload
Data relating to uploading videos
Source code in cocorum/static.py
167 168 169 170 171 172 173 174 175 176 177 | |
api_ver = '1.3'
class-attribute
instance-attribute
Upload API version to use
chunksz = 10000000
class-attribute
instance-attribute
Size of upload chunks in bytes, not sure if this can be changed
max_filesize = 15 * 1000 ** 3
class-attribute
instance-attribute
Maximum upload size in bytes, is 15GB as stated by Rumble
S.D.G.