Advertisement
AlanReiAkemi

khususme

Jan 16th, 2016
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. def newK():
  2. resp = urllib.request.urlopen("http://khususme.blogspot.co.id/").read().decode("utf-8").replace('\n','')
  3. res = re.findall("<h2 class='post-title entry-title' itemprop='name'><a href=""'(.*?)'"">(.*?)</a></h2>", resp)
  4. newset = list()
  5. n = 1
  6. for a, b in res:
  7. newset.append("%s. %s: %s" % (n, b, a))
  8. n = n + 1
  9. return "<br/>".join(newset[0:10])
  10.  
  11.  
  12.  
  13. =======================================
  14.  
  15. elif cmd == "knew" and not user.name in blacklist and not room.name in deathroom:
  16. room.message(newK(), True )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement