Skip to content
This repository was archived by the owner on Jun 8, 2023. It is now read-only.

Commit 21223ea

Browse files
committed
Strip trailing slash from URL
Looks like beeradvocate.com is adding trailing slashes which break the image URL.
1 parent 6b35408 commit 21223ea

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/scripts/beeradvocate.coffee

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ module.exports = (robot) ->
2121
msg.http("http://beeradvocate.com/beer/")
2222
.get() (err, res, body) ->
2323
if (res.statusCode == 200)
24-
reg = /<h6><a href="\/beer\/profile\/(.+?)\/(.+?)">(.+?)<\/a><\/h6>/i
24+
reg = /<h6><a href="\/beer\/profile\/(.+?)\/(.+?)\/?">(.+?)<\/a><\/h6>/i
2525
results = body.match(reg)
2626
if (results != null && results.length > 3)
2727
msg.send results[3]

0 commit comments

Comments
 (0)