Files
wiki/mitmproxy/README.md
2025-03-02 00:53:37 +00:00

31 lines
1.2 KiB
Markdown

# Retries if failed
```python
def response(flow):
retries = 0
while flow.response.status_code != 206:
retries += 1
flow.response = flow.replay().response
print(f"재시도 {retries}: 상태 코드 {flow.response.status_code}")
```
```python
for idx, line in enumerate(open('m3u8').readlines()):
os.system(f"ffmpeg -y -http_proxy http://localhost:8080 -i '{line.strip()}' -c:v copy -c:a copy {idx+1:02}.mp4")
```
---
```shell
mitmweb
```
```shell
playwright ff --proxy-server http://localhost:8080 --ignore-https-errors
```
```shell
chromium --proxy-server=localhost:8080 --ignore-certificate-errors --disable-backgrounding-occluded-windows
```
```shell
chromium --proxy-server=172.17.112.1:8080 --ignore-certificate-errors --remote-debugging-port=9222 --remote-allow-origins=* --user-agent="Mozilla/5.0 (Linux; Android 15) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.6834.122 Mobile Safari/537.36"
```
```shell
chrome --proxy-server=localhost:8080 --ignore-certificate-errors --disable-backgrounding-occluded-windows --user-agent="Mozilla/5.0 (Linux; Android 15) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.6834.122 Mobile Safari/537.36"
```