Created
July 4, 2022 18:22
-
-
Save hirawatt/c9ec050fbbbe7463b454ab7a4709a6c1 to your computer and use it in GitHub Desktop.
Streamlit Logo Extractor from URL
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import streamlit as st | |
from PIL import Image | |
import requests | |
from io import BytesIO | |
input_link = st.text_input("Paste Link of Website", value="https://www.google.com") | |
logo_link = input_link + "/favicon.ico" | |
response = requests.get(logo_link) | |
img = Image.open(BytesIO(response.content)) | |
st.image(img) | |
# This Link -> https://www.google.com/s2/favicons?sz=64&domain_url={WEBSITE_URL} can also be used. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment