Skip to content

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
115
116
117
118
119
120
121
122
123
124
125
126
127
128
class Delays:
    """Various times for delays and waits"""

    request_timeout = 20
    """How long to wait before giving up on a network request, in seconds"""

    upload_request_timeout = 300
    """How long to wait before giving up on a video chunk upload, in seconds"""

    api_refresh_default = 10
    """How long to reuse old data from the main API, in seconds"""

    api_refresh_minimum = 5
    """Minimum refresh rate for the main API, as defined by Rumble"""

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 = 20 class-attribute instance-attribute

How long to wait before giving up on a network request, 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
131
132
133
134
135
136
137
138
139
140
141
class Message:
    """For chat messages"""

    max_len = 200
    """Maximum chat message length"""

    send_cooldown = 3
    """How long to wait between sending messages"""

    command_prefix = "/"
    """Prefix Rumble uses for native command"""

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
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
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
class Misc:
    """No idea where else to put this data"""

    base36 = "0123456789abcdefghijklmnopqrstuvwxyz"
    """Digits of the numerical base 36 that Rumble uses"""

    badges_as_glyphs = {
        "verified": "✅",
        "admin": "👑",
        "moderator": "🛡",
        "premium": "🗲",
        "locals": "♖",
        "recurring_subscription": "♖",
        "locals_supporter": "⛋",
        "whale-grey": "🐳",
        "whale-yellow": "🐳",
        "whale-blue": "🐳",
    }
    """Dictionary of badge slugs mapped to UTF-8 glyphs, for end-user convenience"""

    text_encoding = "utf-8"
    """Encoding for all text-bytes conversions"""

    badge_icon_size = "48"
    """Size of chat badge icons to retrieve, only valid one has long been the string 48"""

    timestamp_format = "%Y-%m-%dT%H:%M:%S%z"
    """Rumble's timestamp format in ISO 8601 designations"""

    session_token_key = "u_s"
    """Key of the session token within the session cookie dict"""

    find_acc_apikey = re.compile(
        r'(?<=var \$a = new Account\("AccountOverview",").*(?="\);)'
    )
    """RegEx to find the account API key in the https://rumble.com/account page source
    It looks like this: `var $a = new Account("AccountContent","##########");`"""

    tag_split = ", "
    """Characters that video tags are separated by"""

    video_edit_success = "Your changes have been saved!<br>Please allow up to 30 seconds for them to take effect."
    """Message that Rumble shows (in HTML) upon successful video edit"""

    class ContentTypes:
        """Types of content that can be rumbled on"""

        video = 1
        """A video or livestream"""

        comment = 2
        """A comment"""

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
201
202
203
204
205
206
207
208
class ContentTypes:
    """Types of content that can be rumbled on"""

    video = 1
    """A video or livestream"""

    comment = 2
    """A comment"""

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
25
26
27
28
29
30
31
32
33
34
class RequestHeaders:
    """Headers for various HTTPrequests"""

    user_agent = {
        "User-Agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.103 Safari/537.36"
    }
    """Header with a fake user-agent string"""

    sse_api = {"Accept": "text/event-stream"}
    """Headers for the SSE chat API"""

sse_api = {'Accept': 'text/event-stream'} class-attribute instance-attribute

Headers for the SSE chat API

user_agent = {'User-Agent': 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.103 Safari/537.36'} class-attribute instance-attribute

Header with a fake user-agent string

StaticAPIEndpoints

API endpoints that don't change and shouldn't trigger a refresh

Source code in cocorum/static.py
37
38
39
40
41
42
43
44
45
46
47
48
49
class StaticAPIEndpoints:
    """API endpoints that don't change and shouldn't trigger a refresh"""

    main = [
        "user_id",
        "username",
        "channel_id",
        "channel_name",
    ]
    """Endpoints of the main API"""

    stream = ["id", "created_on"]
    """Endpoints of the stream subobject"""

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
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 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
class URI:
    """URIs to various Rumble services"""

    rumble_base = "https://rumble.com"
    """Base URL to Rumble's website, for URLs that are relative to it"""

    login_test = rumble_base + "/login.php"
    """Test the session token by sending it here and checking the redirect URL"""

    login_fail = "auth.rumble.com"
    """This URL component will be in a failed session login redirect, but not a successful one"""

    mutes_page = rumble_base + "/account/moderation/muting?pg={page}"
    """Webpage with all the mutes on it, format with page number"""

    channels_page = rumble_base + "/user/{username}/channels"
    """Channels under a user, format with username"""

    rls_api_keys_page = rumble_base + "/account/livestream-api"
    """Live Stream API key management, with the keys for viewing"""

    playlists_page = rumble_base + "/my-library/playlists"
    """The logged-in user's playlist page"""

    account_page = rumble_base + "/account"
    """Account page"""

    acc_settings_page = account_page + "/settings"
    """Account settings page, where lots of user info is stored"""

    servicephp = rumble_base + "/service.php"
    """The Service.PHP API"""

    uploadphp = rumble_base + "/upload.php"
    """The video upload PHP"""

    rumbot_suffix = "/api/ls"
    """RumBot passthrough API ending"""

    class ChatAPI:
        """URIs of the chat API"""

        base = "https://web7.rumble.com/chat/api/chat/{stream_id_b10}"
        """Rumble's internal chat URL for a stream, format this string with a stream_id_b10"""

        sse_stream = base + "/stream"
        """SSE stream of chat events"""

        message = base + "/message"
        """Message actions"""

        command = "https://rumble.com/chat/command"
        """Chat commands (does not use the base)"""

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_fail = 'auth.rumble.com' class-attribute instance-attribute

This URL component will be in a failed session login redirect, but not a successful one

login_test = rumble_base + '/login.php' class-attribute instance-attribute

Test the session token by sending it here and checking the redirect URL

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
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
class ChatAPI:
    """URIs of the chat API"""

    base = "https://web7.rumble.com/chat/api/chat/{stream_id_b10}"
    """Rumble's internal chat URL for a stream, format this string with a stream_id_b10"""

    sse_stream = base + "/stream"
    """SSE stream of chat events"""

    message = base + "/message"
    """Message actions"""

    command = "https://rumble.com/chat/command"
    """Chat commands (does not use the base)"""

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
144
145
146
147
148
149
150
151
152
153
154
class Upload:
    """Data relating to uploading videos"""

    chunksz = 10000000
    """Size of upload chunks in bytes, not sure if this can be changed"""

    api_ver = "1.3"
    """Upload API version to use"""

    max_filesize = 15 * (1000**3)
    """Maximum upload size in bytes, is 15GB as stated by Rumble"""

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.