Ejemplo n.º 1
0
    def test_retrieve_html(self):
        print 'Test1: test_retrieve_html()'
        url = '''allintitle:"Augmenting Branching Temporal Logics with Existential Quantification over Atomic Propositions" OR "Branching-Depth Hierarchies" OR "On the Relative Succinctness of Nondeterministic Buchi and co-Buchi Word Automata"'''
        url2 = "http://scholar.google.com/scholar?hl=en&num=100&q=%s" % url
        url2 = URLCleaner.encodeUrlForDownload(url2)

        url2 = '''http://scholar.google.com/scholar?hl=en&num=100&as_subj=eng&q=%22Finding%20the%20Number%20of%20Factors%20of%20a%20Polynomial%22OR%22Probabilistic%20Models%20of%20Database%20Locking:%20Solutions,%20Computational%20Algorithms,%20and%20Asymptotics%22OR%22The%20AWK%20Programming%20Language%22OR%22Factoring%20Polynomials%20Over%20Algebraic%20Number%20Fields%22'''
        getter = HtmlRetriever(use_proxy=False)
        print getter.getHtmlRetry(url2, 1)
Ejemplo n.º 2
0
 def test_retrieve_html2(self):
     url = '''allintitle:"Augmenting Branching Temporal Logics with Existential Quantification over Atomic Propositions" OR "Branching-Depth Hierarchies" OR "On the Relative Succinctness of Nondeterministic Buchi and co-Buchi Word Automata"'''
     url2 = "http://scholar.google.com/scholar?hl=en&num=100&q=%s" % url
     url2 = URLCleaner.encodeUrlForDownload(url2)
     getter = HtmlRetriever(use_proxy=True)
     print getter.getHtmlRetry(url2, 1)
Ejemplo n.º 3
0
 def __init__(self):
     self.debug_print = True
     self.settings = Settings.getInstance()
     self.htmlRetriever = HtmlRetriever(self.settings.use_proxy)
     #self.htmlRetriever.validate_html_callback = self.validate_html_callback
     self.parsegoogle = GoogleResultParser()
Ejemplo n.º 4
0
 def __init__(self):
     self.settings = Settings.getInstance()
     self.parsegoogle = GoogleResultParser()
     self.htmlRetriever = HtmlRetriever(self.settings.use_proxy)
     self.checker = checker()