I am trying to get the list of files with timestamp (date) from my jrog artifactory through python code. I am using BeautifulSoup python package to get the particular details. but its failing to read the data from curl output. please suggest.
#!/usr/bin/python
import os
from bs4 import BeautifulSoup
output = os.system('curl -X GET "http://myjfrog.cricinfo.com:8082/artifactory/generic-local/"')
soup = BeautifulSoup(output, 'html.parser')
print (soap.title)
but i am getting below error
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<html>
<head><meta name="robots" content="noindex" />
<title>Index of generic-local/</title>
</head>
<body>
<h1>Index of generic-local/</h1>
<pre>Name Last modified Size</pre><hr/>
<pre><a href="1.sh">1.sh</a> 24-Jul-2020 06:51 -
<a href="ec2.py">ec2.py</a> 24-Jul-2020 06:46 3.11 KB
<a href="passwd">passwd</a> 21-Jul-2020 13:47 1.29 KB
<a href="s3_test.py">s3_test.py</a> 21-Jul-2020 13:08 94 bytes
<a href="zoo.sh">zoo.sh</a> 24-Jul-2020 06:52 -
</pre>
<hr/><address style="font-size:small;">Artifactory/7.6.3 Server at localhost Port 8081</address></body></html>Traceback (most recent call last):
File "./2_repo.py", line 7, in <module>
soup = BeautifulSoup(output, 'html.parser')
File "/usr/local/lib/python3.6/site-packages/bs4/__init__.py", line 307, in __init__
elif len(markup) <= 256 and (
TypeError: object of type 'int' has no len()