示例#1
0
def scraper_test(args):
    "Quick test of scraper functions on a list of blogs"

    blogs = file(args.blog_file,'r').read()[:-1].split('\n')
    inspector = XpathInspector(args.input_path, blogs)
    
    xpath_queries = file(args.xpath_query_file,'r').read()[:-1].split('\n')
    
    inspector.inspect(xpath_queries, args.mapper)
示例#2
0
def xpath_test(args):
    "Quick comparison of blogs to xpath queries"
    
    blogs = file(args.blog_file,'r').read()[:-1].split('\n')
    inspector = XpathInspector(args.input_path, blogs)
    
    xpath_queries = file(args.xpath_query_file,'r').read()[:-1].split('\n')
    
    inspector.inspect(xpath_queries, args.mapper)