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

Replies to Re: bbbb rss

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