@@ -435,6 +435,7 @@ def sanitize(self, node, candidates):
435
435
for kind in ['p' , 'img' , 'li' , 'a' , 'embed' , 'input' ]:
436
436
counts [kind ] = len (el .findall ('.//%s' % kind ))
437
437
counts ["li" ] -= 100
438
+ counts ["input" ] -= len (el .findall ('.//input[@type="hidden"]' ))
438
439
439
440
# Count the text length excluding any surrounding whitespace
440
441
content_length = text_length (el )
@@ -590,6 +591,9 @@ def main():
590
591
parser .add_option ('-b' , '--browser' , default = None , action = 'store_true' , help = "open in browser" )
591
592
parser .add_option ('-l' , '--log' , default = None , help = "use filename for logs (appended)" )
592
593
parser .add_option ('-u' , '--url' , default = None , help = "use URL instead of a local file" )
594
+ parser .add_option ('-s' , '--show-xpath' , default = None , help = "show xpath" )
595
+ parser .add_option ('-x' , '--xpath' , default = None , help = "use xpath" )
596
+ parser .add_option ('-t' , '--support-text' , default = None , help = "use this support text" )
593
597
parser .add_option ('-p' , '--positive-keywords' , default = None , help = "positive keywords (separated with comma)" , action = 'store' )
594
598
parser .add_option ('-n' , '--negative-keywords' , default = None , help = "negative keywords (separated with comma)" , action = 'store' )
595
599
(options , args ) = parser .parse_args ()
0 commit comments