def test_url_normalizer_url_helper3(self): url = '://example.org/manga/here.html' test_url = normalize_uri(url, self.referer) self.assertEqual(self.referer, test_url)
def test_url_normalizer_url_helper4(self): url = 'here.html' test_url = normalize_uri(url, self.referer) self.assertEqual(self.referer, test_url)
def parse_images(self, content): images = [] for i in content.cssselect('img'): src = normalize_uri(i.get('src'), self.url) images.append(src) return images