Exemplo n.º 1
0
    def test_browler_without_grid(self):

        config = {
            "browser": 'firefox',
            "url": "https://en.wikipedia.org/wiki/Main_Page",
            "limit": 2,
            "processes": 2,
            "plugins": [
                SamplePlugin()
            ],
            "filters": [
                re.compile('bad-stuff'),
                ]
        }
        crawler = Browler(config)
        crawler.crawl()
Exemplo n.º 2
0
    def _test_browler(self):

        config = {
            "browser": 'remote',
            "remote": {
                "url": 'http://localhost:49044/wd/hub',
                'browser': 'firefox'
            },
            "url": "https://en.wikipedia.org/wiki/Main_Page",
            "limit": 2,
            "processes": 2,
            "plugins": [
              SamplePlugin()
            ],
            "filters": [
                re.compile('bad-stuff'),
            ]
        }
        crawler = Browler(config)
        crawler.crawl()