Facebook
From anti_gay_programmer, 3 Years ago, written in Python.
Embed
Download Paste or View Raw
Hits: 155
  1. def drug_wiki(_input):
  2.         a=0
  3.         if _input['cmd']=='chat' and  len(_input['text'].strip())>7 and '`drug ' in _input['text']:
  4.                 _input=_input['text']
  5.                 term=_input[6::]
  6.                 encoded_search = urllib.parse.quote(term)
  7.                 print(encoded_search)
  8.                 url='http://psychonaut3z5aoz.onion/w/index.php?search='+encoded_search+"&redirect=no"
  9.                 req = urllib.request.Request(url)
  10.                 response = urllib.request.urlopen(req)
  11.                 output=bs(response,'html.parser')
  12.                 _result=[]
  13.                 for drug in output.select(".mw-search-result-heading"):
  14.                         if a<1:
  15.                                 if drug["href"].startswith("/"):
  16.                                         a+=1
  17.                                         drug_info = {"title": drug["title"], "link": drug["href"]}
  18.                                         title=drug_info['title']
  19.                                         link=drug_info['link']
  20.                                         url=title+':\n'+'* http://psychonaut3z5aoz.onion'+link
  21.                                         _send_msg(url)
  22.  

Replies to bbbb rss

Title Name Language When
Re: bbbb anti_gay_programmer python 3 Years ago.