2 # -*- coding: utf-8 -*-
4 # Created on: 13.01.2017
6 # strips html from input
7 # used the kick out the junk, when parsing the inline JS objects of the Netflix homepage
8 from HTMLParser import HTMLParser
9 class MLStripper(HTMLParser):
13 def handle_data(self, d):
16 return ''.join(self.fed)
23 # Takes everything, does nothing, classic no operation function
28 def log(f, name=None):
31 def wrapped(*args, **kwargs):
33 class_name = that.__class__.__name__
35 for key, value in kwargs.iteritems():
36 if key != 'account' and key != 'credentials':
37 arguments += ":%s = %s:" % (key, value)
39 that.log('"' + class_name + '::' + name + '" called with arguments ' + arguments)
41 that.log('"' + class_name + '::' + name + '" called')
42 result = f(*args, **kwargs)
43 that.log('"' + class_name + '::' + name + '" returned: ' + str(result))
45 wrapped.__doc__ = f.__doc__