Example #1
0
def record():
    """Return results generator from the Alpha spider."""
    spider = phenix_spider.PhenixSpider()
    response = fake_response_from_file('phenix/test_1.html')
    selector = Selector(response, type='html')
    nodes = selector.xpath('//%s' % spider.itertag)
    return spider.parse_node(response, nodes[0])
Example #2
0
def non_thesis():
    """Return a heprecord for a Master's thesis (should be None as we don't
    want them)."""
    spider = phenix_spider.PhenixSpider()
    body = """
    <ul>
    <li><b>M.Sc. Author</b>:
    "This is an Master's thesis, not a PhD", &nbsp; M.Sc. thesis at Master Science University, 2016,&nbsp;
    <br><br>
    </ul>
    """
    response = fake_response_from_string(body)
    node = get_node(spider, '//li', text=body)
    return spider.parse_node(response, node)