feedify; make function use clearer
parent
d6882e0a6a
commit
f965566054
|
@ -171,7 +171,7 @@ class Builder(object):
|
||||||
return a
|
return a
|
||||||
|
|
||||||
def strings(self, html, expr):
|
def strings(self, html, expr):
|
||||||
" Turns the results into a nice array of strings (ie. sth useful) "
|
" Turns the results of raw() into a nice array of strings (ie. sth useful) "
|
||||||
|
|
||||||
if self.rule['mode'] == 'xpath':
|
if self.rule['mode'] == 'xpath':
|
||||||
out = []
|
out = []
|
||||||
|
@ -188,7 +188,7 @@ class Builder(object):
|
||||||
return out
|
return out
|
||||||
|
|
||||||
def string(self, html, expr):
|
def string(self, html, expr):
|
||||||
" Makes a formatted string out of the getter and rule "
|
" Makes a formatted string, using our custom template format, out of the getter and rule "
|
||||||
|
|
||||||
getter = lambda x: self.strings(html, x)
|
getter = lambda x: self.strings(html, x)
|
||||||
return format_string(self.rule[expr], getter)
|
return format_string(self.rule[expr], getter)
|
||||||
|
|
Loading…
Reference in New Issue