Just a couple stylistic points
Function/Variable Naming
Functions and variables should be in snake_case (PEP 8).
getMessage -> get_message
encodeMessage -> encode_message
sendMessage -> send_message
Docstrings
You can include docstrings to provide some explanation for your methods and describe your parameters and return value. (PEP 8).
Something like
def make_URL(qnumber):
"""
Creates a URL with the passed "qnumber" and returns the URL.
:param qnumber -> int qnumber: Question number to query
:return str: Formatted URL
"""
Type Hints
You can include type hints to easily identify what types are accepted and returned.
def make_URL(qnumber: str) -> str:
...