Ejemplo n.º 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)
Ejemplo n.º 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)