Add support to read from url

This commit is contained in:
Vinayak Mehta
2018-12-24 12:55:52 +05:30
parent 0198f5527c
commit 2b3461deab
4 changed files with 100 additions and 18 deletions
+8
View File
@@ -207,6 +207,14 @@ def test_repr():
assert repr(tables[0].cells[0][0]) == "<Cell x1=120.48 y1=218.43 x2=164.64 y2=233.77>"
def test_url():
url = "https://camelot-py.readthedocs.io/en/master/_static/pdf/foo.pdf"
tables = camelot.read_pdf(url)
assert repr(tables) == "<TableList n=1>"
assert repr(tables[0]) == "<Table shape=(7, 7)>"
assert repr(tables[0].cells[0][0]) == "<Cell x1=120.48 y1=218.43 x2=164.64 y2=233.77>"
def test_arabic():
df = pd.DataFrame(data_arabic)