From anti_gay_programmer, 3 Years ago, written in Python.
This paste is a reply to
bbbb from anti_gay_programmer
-
view diff
Embed
def drug_wiki(_input):
a=0
if _input['cmd']=='chat' and len(_input['text'].strip())>7 and '`drug ' in _input['text']:
_input=_input['text']
term=_input[6::]
encoded_search = urllib.parse.quote(term)
print(encoded_search)
url='http://psychonaut3z5aoz.onion/w/index.php?search='+encoded_search
req = urllib.request.Request(url)
response = urllib.request.urlopen(req)
output=bs(response,'html.parser')
print('aids')
for drug in output:
if a<1:
if drug["href"].startswith("/wiki"):
a+=1
drug_info = {"title": drug["title"], "link": drug["href"]}
title=drug_info['title']
link=drug_info['link']
url=title+':\n'+'* http://psychonaut3z5aoz.onion'+link
_send_msg(url)
Replies to Re: bbbb
Title |
Name |
Language |
UNIX |
When |
Re: Re: bbbb |
anti_gay_programmer |
python |
1590827643 |
3 Years ago. |
{"html5":"htmlmixed","css":"css","javascript":"javascript","php":"php","python":"python","ruby":"ruby","lua":"text\/x-lua","bash":"text\/x-sh","go":"go","c":"text\/x-csrc","cpp":"text\/x-c++src","diff":"diff","latex":"stex","sql":"sql","xml":"xml","apl":"apl","asterisk":"asterisk","c_loadrunner":"text\/x-csrc","c_mac":"text\/x-csrc","coffeescript":"text\/x-coffeescript","csharp":"text\/x-csharp","d":"d","ecmascript":"javascript","erlang":"erlang","groovy":"text\/x-groovy","haskell":"text\/x-haskell","haxe":"text\/x-haxe","html4strict":"htmlmixed","java":"text\/x-java","java5":"text\/x-java","jquery":"javascript","mirc":"mirc","mysql":"sql","ocaml":"text\/x-ocaml","pascal":"text\/x-pascal","perl":"perl","perl6":"perl","plsql":"sql","properties":"text\/x-properties","q":"text\/x-q","scala":"scala","scheme":"text\/x-scheme","tcl":"text\/x-tcl","vb":"text\/x-vb","verilog":"text\/x-verilog","yaml":"text\/x-yaml","z80":"text\/x-z80"}