Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Latest commit

 

History

History
History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

README.md

Outline

WiFi Connection Checker and Restarter

Overview

This Python script shortens long URLs using the TinyURL service. It sends an HTTP request to the TinyURL API with the provided long URL and retrieves a shortened version in response. If the request is successful, the script prints the shortened URL to the console; otherwise, it reports an error. The script relies on the requests library to handle HTTP communication and provides a simple, programmatic way to generate compact URLs.

Dependencies

Install the requests package using the following commands:

pip install request

Usage

  1. Install the required dependency:
    pip install requests
  2. Run the script:
    python url_shortener.py
  3. When prompted, enter the long URL you want to shorten and press Enter.
  4. The script will send the URL to the TinyURL service.
  5. If successful, the shortened URL will be displayed in the console.
  6. If an error occurs, an error message will be shown instead.
Morty Proxy This is a proxified and sanitized view of the page, visit original site.