From 120e7be74216a22306f6177c043d50b05ce89dfb Mon Sep 17 00:00:00 2001 From: Gertjan van den Burg Date: Thu, 30 Jan 2020 21:17:06 +0000 Subject: [WIP] Provider for Taylor and Francis Online --- tests/test_providers.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'tests') diff --git a/tests/test_providers.py b/tests/test_providers.py index e256eec..3204768 100644 --- a/tests/test_providers.py +++ b/tests/test_providers.py @@ -23,6 +23,7 @@ from paper2remarkable.providers import ( PdfUrl, PubMed, Springer, + TandFOnline, ) from paper2remarkable.providers.arxiv import DEARXIV_TEXT_REGEX @@ -206,6 +207,20 @@ class TestProviders(unittest.TestCase): filename = prov.run(url) self.assertEqual(exp, os.path.basename(filename)) + def test_tandfonline_1(self): + prov = TandFOnline(upload=False, verbose=VERBOSE) + url = "https://www.tandfonline.com/doi/full/10.1080/01621459.2017.1385466" + exp = "Fearnhead_Rigaill_-_Changepoint_Detection_in_the_Presence_of_Outliers_2018.pdf" + filename = prov.run(url) + self.assertEqual(exp, os.path.basename(filename)) + + def test_tandfonline_2(self): + prov = TandFOnline(upload=False, verbose=VERBOSE) + url = "https://www.tandfonline.com/doi/pdf/10.1080/03610918.2012.625790?scroll=top&needAccess=true" + exp = "Huskova_Marusiakova_-_M-Procedures_for_Detection_of_Changes_for_Dependent_Observations_2012.pdf" + filename = prov.run(url) + self.assertEqual(exp, os.path.basename(filename)) + if __name__ == "__main__": unittest.main() -- cgit v1.2.3 From f3fdc28417a892b9d42dc411a85b40d237355157 Mon Sep 17 00:00:00 2001 From: Gertjan van den Burg Date: Tue, 27 Oct 2020 20:53:58 +0100 Subject: Bugfix for content type detection --- tests/test_ui.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'tests') diff --git a/tests/test_ui.py b/tests/test_ui.py index 835f594..1cca0cd 100644 --- a/tests/test_ui.py +++ b/tests/test_ui.py @@ -100,6 +100,11 @@ class TestUI(unittest.TestCase): "https://confcats_isif.s3.amazonaws.com/web-files/journals/entries/Nonlinear%20Kalman%20Filters.pdf", "https://confcats_isif.s3.amazonaws.com/web-files/journals/entries/Nonlinear%20Kalman%20Filters.pdf", ), + ( + PdfUrl, + "https://publications.aston.ac.uk/id/eprint/38334/1/5th_Artificial_Neural_Networks.pdf", + "https://publications.aston.ac.uk/id/eprint/38334/1/5th_Artificial_Neural_Networks.pdf", + ), ( JMLR, "https://www.jmlr.org/papers/volume17/14-526/14-526.pdf", -- cgit v1.2.3