\ nigger - /g/pasta 2.4
From vashidu, 5 Years ago, written in Python.
Embed
  1. import re
  2.  
  3.  
  4.  
  5. def fucking_weather(willie, trigger):
  6.     text = trigger.group(2)
  7.     if not text:
  8.         willie.reply("INVALID FUCKING PLACE. PLEASE ENTER A FUCKING ZIP CODE, OR A FUCKING CITY-STATE PAIR.")
  9.         return
  10.     text = web.quote(text)
  11.     page = web.get("http://thefuckingweather.com/?where=%s" % (text))
  12.     re_mark = re.compile('<p class="remark">(.*?)</p>')
  13.     results = re_mark.findall(page)
  14.     if results:
  15.         willie.reply(results[0])
  16.     else:
  17.          willie.reply("I CAN'T GET THE FUCKING WEATHER.")
  18.          return willie.NOLIMIT
  19. fucking_weather.commands = ['fucking_weather', 'fw']
  20. fucking_weather.rate = 30
  21. fucking_weather.priority = 'low'
  22.