Skip to content

Instantly share code, notes, and snippets.

@MahraibFatima
Created February 25, 2024 15:14
Show Gist options
  • Save MahraibFatima/73c943d26fa6a9ffc07240f593647b26 to your computer and use it in GitHub Desktop.
Save MahraibFatima/73c943d26fa6a9ffc07240f593647b26 to your computer and use it in GitHub Desktop.
create QR.png file of given url (if valid)
import pyqrcode
try:
link = input("Enter your link: ")
qr_code = pyqrcode.create(link)
qr_code.png("your_qr_code.png", scale=5)
print("QR code generated successfully!")
except Exception as e:
print("An error occurred:", e)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment