Exemplo n.º 1
0
 def test_connecttoWebsite(self):
     url = os.path.dirname(
         os.path.realpath(__file__)) + "/../testdata/testWebsite.html"
     ignoreTerm = ["Chính hãng", "Chính Hãng", "-"]
     try:
         result = ScrapEngine.connectToStaticWebSite(url, ignoreTerm)
         self.assertIsNotNone(result, "Beautiful soup result is none")
     except:
         self.fail("Unable to connect to website")
Exemplo n.º 2
0
 def getOnePage(self, URL):
     return self.parseData(
         ScrapEngine.connectToStaticWebSite(URL, self.ignoreTerm), URL)