In [28]:
import requests
from IPython.core.display import display, HTML
import re
import urllib3
urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
In [29]:
prefix = "https://www.syseng.com.br/assets/svg/icons/"
htmlpage = requests.get(prefix, verify=False).text
In [32]:
m = re.findall("\"([^\"]+.svg)\"", htmlpage)
html = "<ul style='list-style: none;'>"
if m:
    for mm in m:
        link = prefix + mm
        rs = requests.get(link, verify=False)
        svg = rs.content.decode()
        html += f"<li style='width:60px;float:left;'>{svg}</li>"
html += "</ul>"
display(HTML(html))
  • image/svg+xml
  • image/svg+xml
In [ ]:
 
In [ ]:
 
In [ ]:
 
In [ ]:
 
In [ ]:
 
In [25]:
html
Out[25]:
'<ul></ul>'
In [3]:
rs = requests.get("https://www.syseng.com.br/assets/svg/icons/facebook.svg", verify=False)
/opt/conda/lib/python3.7/site-packages/urllib3/connectionpool.py:847: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings
  InsecureRequestWarning)
In [8]:
html = rs.content.decode()
In [9]:
display(HTML(html))
In [ ]: