plugins, parsing threads list with BeautifulSoup
[chanspy.git] / server / base_plugin.py
blob644fc95d543a7e3e737a75afdb183b3715da84ec
1 import urllib
3 class BasePlugin():
4 '''Base plugin class. Replacing by users plugins.'''
6 def get_threads_list(self, chan_name, board_name, chan_settings):
7 return []
9 #---------------------------------------------#
10 def get_uri(self, uri):
11 try:
12 u = urllib.urlopen(uri)
13 s = u.read()
14 u.close()
15 except:
16 return None
17 else:
18 return s