File size: 298 Bytes
dcb21f9
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
import qrcode

def generate_qrcode(weblink):
    qr = qrcode.QRCode(version=1, box_size=10, border=5)
    qr.add_data(weblink)
    qr.make(fit=True)
    qr_img = qr.make_image(fill="black", back_color="white")
    qr_img.save("qrcode.png")

# Example usage
generate_qrcode("https://www.google.com")