コード例 #1
0
ファイル: shell.py プロジェクト: wgfi110/crawley
    def execute(self):

        try:
            import IPython
        except ImportError:
            exit_with_error("Please install the ipython console")

        url = self.args[0]
        crawler = BaseCrawler()

        response = crawler._get_response(url)
        html = XPathExtractor().get_object(response)

        shell = IPython.Shell.IPShellEmbed(argv=[],
                                           user_ns={'response': response})
        shell()
コード例 #2
0
ファイル: crawler_test.py プロジェクト: wgfi110/crawley
 def setUp(self):
     self.crawler = BaseCrawler()