Exemplo n.º 1
0
 def testMatch(self):
     item = ldrfullfeed.match(self.data, "http://no.match.url/")
     self.assertEqual(item["xpath"], "//body")
     start = time.time()
     item = ldrfullfeed.match(self.data, "http://douganoyoake.blog18.fc2.com/items")
     print "SEARCH TIME: " + str((time.time() - start)*1000) + " msec"
     self.assertEqual(item["xpath"], '//div[(@class="e-text")]')
Exemplo n.º 2
0
 def testMatch(self):
     item = ldrfullfeed.match(self.data, "http://no.match.url/")
     self.assertEqual(item["xpath"], "//body")
     start = time.time()
     item = ldrfullfeed.match(self.data,
                              "http://douganoyoake.blog18.fc2.com/items")
     print "SEARCH TIME: " + str((time.time() - start) * 1000) + " msec"
     self.assertEqual(item["xpath"], '//div[(@class="e-text")]')
Exemplo n.º 3
0
 def get_xitem(fetch_url):
     return ldrfullfeed.match(data, fetch_url)
Exemplo n.º 4
0
 def get_xitem(fetch_url):
     return ldrfullfeed.match(data, fetch_url)