forked from ben/bitbot-modules
replace twitter url with nitter.net link when shortening
This commit is contained in:
parent
64b9597400
commit
4f3a6a2483
4
ttm.py
4
ttm.py
|
@ -9,6 +9,10 @@ class Module(ModuleManager.BaseModule):
|
|||
if len(url) < 18:
|
||||
return None
|
||||
|
||||
if url.startswith("https://twitter.com") or url.startswith("https://www.twitter.com")\
|
||||
or url.startswith("http://twitter.com") or url.startswith("http://www.twitter.com"):
|
||||
url = url.replace("twitter.com", "nitter.net")
|
||||
|
||||
page = utils.http.request(URL, method="POST",
|
||||
post_data={"shorten": url})
|
||||
|
||||
|
|
Loading…
Reference in New Issue