python:mjpeg-server-from-webcam
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revision | |||
| python:mjpeg-server-from-webcam [2021/04/06 00:54] – Wuff | python:mjpeg-server-from-webcam [2021/04/06 21:41] (current) – Wuff | ||
|---|---|---|---|
| Line 32: | Line 32: | ||
| from socketserver import ThreadingMixIn | from socketserver import ThreadingMixIn | ||
| from io import StringIO, | from io import StringIO, | ||
| + | from urllib.parse import urljoin, urlparse | ||
| import time | import time | ||
| capture=None | capture=None | ||
| Line 37: | Line 38: | ||
| class CamHandler(BaseHTTPRequestHandler): | class CamHandler(BaseHTTPRequestHandler): | ||
| def do_GET(self): | def do_GET(self): | ||
| + | #remove query string from url | ||
| + | self.path=urljoin(self.path, | ||
| + | |||
| if self.path.endswith(' | if self.path.endswith(' | ||
| self.send_response(200) | self.send_response(200) | ||
python/mjpeg-server-from-webcam.1617666878.txt.gz · Last modified: (external edit)