repo.or.cz
/
chanspy.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
plugins, parsing threads list with BeautifulSoup
[chanspy.git]
/
server
/
base_plugin.py
blob
644fc95d543a7e3e737a75afdb183b3715da84ec
1
import
urllib
2
3
class
BasePlugin
():
4
'''Base plugin class. Replacing by users plugins.'''
5
6
def
get_threads_list
(
self
,
chan_name
,
board_name
,
chan_settings
):
7
return
[]
8
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