diff options
| -rw-r--r-- | paper2remarkable/providers/html.py | 1 | ||||
| -rw-r--r-- | tests/test_providers.py | 8 |
2 files changed, 9 insertions, 0 deletions
diff --git a/paper2remarkable/providers/html.py b/paper2remarkable/providers/html.py index 9f8394c..d71f210 100644 --- a/paper2remarkable/providers/html.py +++ b/paper2remarkable/providers/html.py @@ -67,6 +67,7 @@ class ImgProcessor(markdown.treeprocessors.Treeprocessor): img.attrib["src"] = urllib.parse.urljoin( self._base_url, img.attrib["src"] ) + img.attrib["src"] = img.attrib['src'].rstrip('/') class HTMLInformer(Informer): diff --git a/tests/test_providers.py b/tests/test_providers.py index 0787792..a7f17ff 100644 --- a/tests/test_providers.py +++ b/tests/test_providers.py @@ -248,6 +248,14 @@ class TestProviders(unittest.TestCase): # this is a proxy test to check that all images are included self.assertEqual(32, len(pdfplumber.open(filename).pages)) + def test_html_4(self): + prov = HTML(upload=False, verbose=VERBOSE) + url = "https://sirupsen.com/2019/" + filename = prov.run(url) + # this is a proxy test to check that all images are included + self.assertEqual(4, len(pdfplumber.open(filename).pages)) + + if __name__ == "__main__": unittest.main() |
