URL SHORTENER READY – Your users can use the product as an URL Shortener as well! HIGHLY CUSTOMIZABLE BIOLINK PAGES – Just check out the demo and you will see for yourself !īIOLINK PAGES EMBEDS – Including YouTube, Soundcloud, Spotify, Twitch, Vimeo & TikTok ready embeds. UNLIMITED BIOLINK PAGES – Users can create multiple Biolink Pages from one single account. If you want to start a business, sell plans to other users and make money, you will need the Extended License. You can use the software for your own needs, as an agency or for your team – with the Regular License. Ex.66biolinks (former phpBiolinks) is the only social bio link platform you’ll ever need, including a fully-featured URL Shortener, a QR Codes system & a Web Tools system featuring 120 useful tools. The string seems to be very short, but as no of URLs registered increase the string increases gradually. It posts data to database and generates short string like below image. Now enter URL to shorten and click submit. If you visit in your browser you will see If you observe code carefully, you can easily grasp things. short url(‘/short_url’) just recieves the request for redirect and finally redirects shortened URL to Original URL.Index function(‘/’) returns home page and also posts original URL into database.# This code checks whether database table is created or not Result_cursor = cursor.execute(select_row) Redirect_url = ' with nnect('urls.db') as conn: Return render_template('home.html',short_url= host + encoded_string) Result_cursor = cursor.execute(insert_row)Įncoded_string = toBase62(result_cursor.lastrowid) Host = ' #Assuming urls.db is in your app root folder # main.pyįrom flask import Flask, request, render_template, redirect Now I am creating main.py for flask app and a template file. This is the Base62 code for encoder and decoder in Python from math import floorīase = string.digits + string.lowercase + string.uppercase ![]() They are like Function and Reverse Functions. Decoder generates integer from given string. I here interested only in Base62 because I need to generate strings which are combinations of. Other wise just see what are base conversions here. Now If you know about converting Base10 to Base64 or Base62( any base) then you can proceed with me.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |