AlphaSlayer1964 / kemono-dl

A simple kemono.party downloader using python.
508 stars 81 forks source link

adding a proxy option? #157

Closed catshitz closed 5 months ago

catshitz commented 1 year ago

Description

--proxy http://127.0.0.1:7890

Additional comments

like in yt-dlp

suoyilong commented 1 year ago

you can do this, modify main.py, add a variate proxies = {"https": "127.0.0.1:7890"} and add the option proxies=proxies to every self.session.get like : self.session.get(url=creators_api, cookies=self.cookies, headers=self.headers, proxies=proxies, timeout=self.timeout).json()

it works for me. 自己修改一下source code 就好了,想要实现命令行开启proxy可以自己研究一下

catshitz commented 1 year ago

感谢 cli 临时和永久代理是知道的 只是除clash内开启外 在别处打开的windows terminal内同指令总代理不上😅

suoyilong commented 1 year ago

管理员模式下设置powershell代理

netsh winhttp set proxy 127.0.0.1:7890
netsh winhttps set proxy 127.0.0.1:7890

管理员模式下取消代理 netsh winhttp reset proxy git要单独设代理 git config --global http.proxy http:127.0.0.1:7890

suoyilong commented 1 year ago

python是不走cmd或者powershell代理的。你要是用wsl的话倒是可以用windows代理