#๐Ÿ”’ how do i make a link shortener with python

27 messages ยท Page 1 of 1 (latest)

opal light
#

i want to use my own custom domain.
how do i shorten it and keep it in the database so it's not repeated, or do i opt with keeping it in the database?
how do i encrypt user information as to who registered the link etc. please help! thanks!

undone questBOT
#

@opal light

Python help channel opened

Remember to:

  • Ask your Python question, not if you can ask or if there's an expert who can help.
  • Show a code sample as text (rather than a screenshot) and the error message, if you've got one.
  • Explain what you expect to happen and what actually happens.

:warning: Do not pip install anything that isn't related to your question, especially if asked to over DMs.

hardy drift
#

dumbest & most straightforward way would be create a form in frontend, where user will enter his link, and a DB with links table where one column will be initial link entered by user and another one will be shortened url you returned to user.

About authentication & authorization you can read in Internet, there's more than enough stuff

opal light
#

or big companies

#

like what's different

prime juniper
#

But its all a database

opal light
#

so that's the basic science behind link shorteneres

prime juniper
hardy drift
prime juniper
#

You just need SQLite

prime juniper
opal light
#

like say i have a url:
google.com
which gets shortened as 3 random letters and digits

#

so that makes it faster

prime juniper
#

It wouldn't make a very big difference

opal light
opal light
#

database

#

that's it

#

!close

undone questBOT
#
Python help channel closed

This help channel has been closed and it's no longer possible to send messages here. If your question wasn't answered, feel free to create a new post in #1035199133436354600. To maximize your chances of getting a response, check out this guide on asking good questions.