umahmood / gfycatdl

Gfycatdl a library and command line tool to download gifs from gfycat.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Gfycatdl

Gfycatdl downloads gifs from gfycat.com

Gfycatdl is a Go library and command line tool.

Note: gfycat.com does have an api which requires an account and each request to be authenticated. This tool simply scrapes the page and gets a download link.

Installation

$ go get github.com/umahmood/gfycatdl

Usage

Command line:

$ gfycatdl -url https://gfycat.com/violetsmartalleycat-sunset-dusk-nature

$ gfycatdl -help

Download gifs from gfycat.com

Usage:

    -help - Print this message and exit.
    -url  - Gfycat url

Example usage:

     $ gfycatdl -url https://gfycat.com/violetsmartalleycat-sunset-dusk-nature

Library:

package main

import (
    "log"
    "github.com/umahmood/gfycatdl"
)

func main() {
    g, err := gfycatdl.New("https://gfycat.com/violetsmartalleycat-sunset-dusk-nature")
    if err != nil {
        log.Fatalln(err)
    }
    scrapedURL, err := g.ScrapeVideoSource()
    if err != nil {
        log.Fatalln(err)
    }
    err = gfycatdl.DownloadFile(g.ResourceName, scrapedURL)
    if err != nil {
        log.Fatalln(err)
    }
}

Documentation

License

See the LICENSE file for license rights and limitations (MIT).

About

Gfycatdl a library and command line tool to download gifs from gfycat.com

License:MIT License


Languages

Language:Go 85.3%Language:HTML 14.7%