From ca4116cec161b90c10e35a0b6a4000ec17f731e5 Mon Sep 17 00:00:00 2001 From: Kevin Zhang Date: Wed, 25 Dec 2013 11:43:20 -0500 Subject: [PATCH] Change default user agent; bump to 1.0.2 --- CHANGELOG.md | 4 ++++ README.md | 4 ++-- main.go | 6 ++---- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4545b87..f5249f6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +1.0.2 - 12/25/2013 + +* Bypass URL parsing for absolute media segment URLs + 1.0.1 - 12/23/2013 * Fix duplicate segment download bug diff --git a/README.md b/README.md index 7a16d42..0581411 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ gohls - HTTP Live Streaming (HLS) downloader written in Golang -* Current version: **1.0.1** +* Current version: **1.0.2** * Author: Kevin Zhang * License: [GNU GPL version 3](http://www.gnu.org/licenses/gpl-3.0.txt) @@ -20,7 +20,7 @@ Currently, binaries are available for the following platforms: * -l=false: Use local time to track duration instead of supplied metadata * -t=0: Recording duration (0 == infinite) -* -ua="Mozilla/5.0 (Windows NT 6.3; WOW64; rv:26.0) Gecko/20100101 Firefox/26.0": User-Agent for HTTP client +* -ua="user-agent": User-Agent for HTTP client The recording duration should be specified as a Go-compatible [duration string](http://golang.org/pkg/time/#ParseDuration). diff --git a/main.go b/main.go index 5254b54..c3b1693 100644 --- a/main.go +++ b/main.go @@ -29,9 +29,7 @@ import "lru" // https://github.com/golang/groupcache/blob/master/lru/lru.go import "strings" import "github.com/grafov/m3u8" -const VERSION = "1.0.2beta" - -const DEFAULT_USER_AGENT = "Mozilla/5.0 (Windows NT 6.3; WOW64; rv:26.0) Gecko/20100101 Firefox/26.0" +const VERSION = "1.0.2" var USER_AGENT string @@ -140,7 +138,7 @@ func main() { duration := flag.Duration("t", time.Duration(0), "Recording duration (0 == infinite)") useLocalTime := flag.Bool("l", false, "Use local time to track duration instead of supplied metadata") - flag.StringVar(&USER_AGENT, "ua", DEFAULT_USER_AGENT, "User-Agent for HTTP client") + flag.StringVar(&USER_AGENT, "ua", fmt.Sprintf("gohls/%v", VERSION), "User-Agent for HTTP client") flag.Parse() os.Stderr.Write([]byte(fmt.Sprintf("gohls %v - HTTP Live Streaming (HLS) downloader\n", VERSION)))