adasilikon.blogg.se

Tinyurl expander
Tinyurl expander









tinyurl expander
  1. Tinyurl expander how to#
  2. Tinyurl expander manual#
  3. Tinyurl expander code#

This is important so I don't break it in a future version unintentionally. Contributing to url_expander ¶ ↑Ĭheck out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yetĬheck out the issue tracker to make sure someone already hasn't requested it and/or contributed itĬommit and push until you are happy with your contribution Thats about it, don't forget to register your class.

Tinyurl expander code#

code = 200 = responseĮlse error = ( JSON. class Request include HTTParty base_uri '' headers 'Content-Type' => 'application/json' headers "Content-length" => "0" end private # A custom fetcher function expand the url using the api. def initialize( short_url, = self super( short_url, options)įetch_url end # Request class will include httpartty and set the base_uri for that service. Subclass UrlExpander::Expanders::Basic ¶ ↑ class Tinyurl 'DRppM' without / PATTERN = %r'( # Reference to the class used by the base class to access Request class within attr_reader :parent_klass # initialize function to do custom initialization # make sure to set the and call super # calling super will only exract the shortening for the url using the pattern defined above.

Tinyurl expander manual#

UrlExpander::Expanders::Scrape: No api, no 301 redirect, manual scraping.Įach service must subclass one of these classes. UrlExpander::Expanders::API: For services that provide expand api. UrlExpander::Expanders::Basic: For services that provides 301 redirect. expand( "")ĭlvr.it UrlExpander :: Client. , sn.im, cl.lk,, UrlExpander :: Client. expand( '', :config_file => '/Users/moski/url_expander_credentials.yml')īit.ly and bitly domains(13,231 domains as of July 19-2011) UrlExpander::Client.expand("")ī UrlExpander :: Client. Default is “~/url_expander_credentials.yml”. You need to provide YAML file with the access credentials. :config_file – Some services Require credentials to access the api (such as bitly). Default value is 10 UrlExpander :: Client. :limit – If the nested_shortening is turned on, then :limit controls the max number of redirection allowed.

tinyurl expander

expand( "", :nested_shortening => false) => "" Require and Use require 'rubygems' # if ruby true) UrlExpander :: Client.

tinyurl expander

Tinyurl expander how to#

Install ¶ ↑ gem install url_expander How to use ¶ ↑ĭownload the config used to authenticate with some of the shortening services curl -s -o ~/url_expander_credentials.yml I tried to make it as simple as possible to extend & add new services. Url_expander is a good start, it covers (13,231 bit.ly domains + 28 different services). I've been working on an analytical tool for and i wanted a way to expand all the shortened urls.

tinyurl expander

) without having to refresh the page.The idea is simple, One expander to expand them all.

  • Supports dynamically updated (AJAX) websites (eg.
  • The title of the website is displayed as a tooltip when available.
  • Scans web pages for short URLs and automatically updates the target URL.
  • Supports login credentials (for services like bit.ly and Cligs).
  • Shorten URLs with one-click operation (the shortened URL is automatically copied to clipboard).
  • The short URL is automatically copied to the clipboard to paste into other applications.ĬhromeMUSE also automatically expands short URLs on any page, replacing the target URL with the original URL and displays the page title as a tooltip. The URL expansion is provided by, which handles links from more than 200 services. A short URL can be generated for any web page, using the user's preferred shortening service. ChromeMUSE is an extension to facilitate the use of URL shortening services.











    Tinyurl expander