plutopluto

git clone https://git.ce9e.org/plutopluto.git

commit
7c8c1886e6b9f4fac66b9ae3280aa4ea86724010
parent
85bafe2e15511f33c8fdeadcbe40185363e92265
Author
Tobias Bengfort <tobias.bengfort@gmx.net>
Date
2014-09-26 03:07
some docstrings

Diffstat

M plutopluto.py 4 ++++

1 files changed, 4 insertions, 0 deletions


diff --git a/plutopluto.py b/plutopluto.py

@@ -17,6 +17,8 @@ cache = SimpleCache()
   17    17 
   18    18 
   19    19 def strip_atts(s):
   -1    20 	"""Strip possibly dangerous HTML attributes."""
   -1    21 
   20    22 	whitelist = ['href', 'src', 'alt', 'title', 'datetime']
   21    23 	tree = BeautifulSoup(s)
   22    24 
@@ -31,6 +33,8 @@ def strip_atts(s):
   31    33 
   32    34 
   33    35 def parse(url):
   -1    36 	"""Get feed and convert to JSON."""
   -1    37 
   34    38 	feed = feedparser.parse(url)
   35    39 
   36    40 	def _parse_item(item):