We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 9cced67 + 95eb1e2 commit 2e89af8Copy full SHA for 2e89af8
1 file changed
src/amcrest/special.py
@@ -10,6 +10,7 @@
10
# vim:sw=4:ts=4:et
11
import logging
12
import shutil
13
+import urllib.parse
14
from typing import Optional
15
16
from urllib3.exceptions import HTTPError
@@ -95,7 +96,10 @@ def _build_rtsp_url(
95
96
else:
97
port = ":{}".format(port_num)
98
- return f"rtsp://{self._user}:{self._password}@{self._host}{port}/{cmd}"
99
+ username = urllib.parse.quote(self._user, safe='')
100
+ password = urllib.parse.quote(self._password, safe='')
101
+
102
+ return f"rtsp://{username}:{password}@{self._host}{port}/{cmd}"
103
104
# pylint: disable=pointless-string-statement
105
"""
0 commit comments