def __init__(self, address, port):
        '''
        Constructor
        '''
        frame_c = frame(address = "http://" + address + ":" + str(port) + "/", time_step = 1000)
        frame_c.attach_app(CrawlerFrame(frame_c))

        frame_c.run_async()
        frame.loop()
예제 #2
0
    def __init__(self, name, timeout, useragent):
        '''
        Constructor
        '''
        frame_c = frame(time_step=timeout)
        frame_c.attach_app(CrawlerFrame(frame_c, name, useragent))

        frame_c.run_async()
        frame.loop()
예제 #3
0
    def __init__(self, name, timeout, useragent):
        '''
        Constructor
        '''
        frame_c = frame(address="http://127.0.0.1:9050", time_step=timeout)
        frame_c.attach_app(CrawlerFrame(frame_c, name, useragent))

        frame_c.run_async()
        frame.loop()
예제 #4
0
    def __init__(self, address, port):
        '''
        Constructor
        '''

        objectless_connector = ObjectlessSpacetimeConnection(
            "CrawlerFrame_{0}".format(CrawlerFrame.app_id),
            address="http://" + address + ":" + str(port) + "/")

        frame_c = ClientFrame(objectless_connector,
                              dataframe_client(),
                              time_step=2000)

        frame_c.attach_app(CrawlerFrame(frame_c))

        frame_c.run_main()