Giter Site home page Giter Site logo

gd_shortener's Introduction

GD Shortener

Python Module for is.gd - v.gd URL Shortener.

What is this?

GD Shortener allow Python software to access is.gd - v.gd URL shortener service.

Using this module you could shorten an URL to a small one like Twitter does for its link.

This service is provided by is.gd - v.gd and, thru the classes in this module, you could view stats on shortened URLs and obtain reverse lookup on URLs.

Install

To install GD Shortener, run the following command:

pip install gdshortener

Usage

After install, to use GD Shortener is sufficient to import the package, choose the implementing class ISGDShortener or VGDShortener (it maps to is.gd or v.gd) and use the following code:

import gdshortener

s = gdshortener.ISGDShortener()
print s.shorten('http://www.google.com')

If you want statistic usage on a URL use:

print s.shorten(url = 'http://www.google.com', log_stat = True)

If you want a custom URL use:

print s.shorten(url = 'http://www.google.com', custom_url = 'Pippus')

If you want to ignore SSL certificate (for older version of OpenSSL):

print s.shorten(url = 'https://expired.badssl.com', verify_ssl = False)

If you have an already shortened URL and want a reverse lookup:

print s.lookup('http://is.gd/Pippus')

License

GD Shortener is licensed under LGPL. See LICENSE.txt for details.

gd_shortener's People

Contributors

albusso avatar torre76 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.