Skip to content
This repository has been archived by the owner on Nov 18, 2024. It is now read-only.

Commit

Permalink
fixes twitter regex for new(?) twitter png pictures
Browse files Browse the repository at this point in the history
  • Loading branch information
Sebastian Winkler committed Nov 10, 2016
1 parent b1ac3ed commit 6c92b3a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ var (
)

const (
VERSION string = "1.9"
VERSION string = "1.9.1"
RELEASE_URL string = "https://github.com/Seklfreak/discord-image-downloader-go/releases/latest"
IMGUR_CLIENT_ID string = "a39473314df3f59"
)
Expand Down Expand Up @@ -85,7 +85,7 @@ func main() {
ChannelWhitelist = cfg.Section("channels").KeysHash()

RegexpUrlTwitter, err = regexp.Compile(
`^http(s?):\/\/pbs\.twimg\.com\/media\/[^\./]+\.jpg((\:[a-z]+)?)$`)
`^http(s?):\/\/pbs\.twimg\.com\/media\/[^\./]+\.(jpg|png)((\:[a-z]+)?)$`)
if err != nil {
fmt.Println("Regexp error", err)
return
Expand Down Expand Up @@ -458,5 +458,5 @@ func downloadFromUrl(dUrl string, filename string, path string) {

func updateDiscordStatus() {
ImagesDownloaded++
dg.UpdateStatus(0, fmt.Sprintf("%d pictures downloaded", ImagesDownloaded))
dg.UpdateStatus(0, fmt.Sprintf("%d pictures downloaded (v%s)", ImagesDownloaded, VERSION))
}

0 comments on commit 6c92b3a

Please sign in to comment.