mirror of
https://github.com/oddluck/limnoria-plugins.git
synced 2025-04-29 06:51:12 -05:00
SpiffyTitles: RegEx Check For Proxy URL
This commit is contained in:
parent
52d087873c
commit
cabe4888e2
@ -69,7 +69,8 @@ class SpiffyTitles(callbacks.Plugin):
|
|||||||
self.proxies["https"] = None
|
self.proxies["https"] = None
|
||||||
proxy = str(conf.supybot.protocols.http.proxy)
|
proxy = str(conf.supybot.protocols.http.proxy)
|
||||||
if proxy:
|
if proxy:
|
||||||
if "http" not in proxy:
|
match = re.match(r"https?:\/\/", proxy, re.IGNORECASE)
|
||||||
|
if not match:
|
||||||
proxy = "http://{0}".format(proxy)
|
proxy = "http://{0}".format(proxy)
|
||||||
self.proxies["http"] = proxy
|
self.proxies["http"] = proxy
|
||||||
self.proxies["https"] = proxy
|
self.proxies["https"] = proxy
|
||||||
|
Loading…
x
Reference in New Issue
Block a user