Permalink
Browse files

Replace separate functions w/ more general regex.

  • Loading branch information...
1 parent 580c2b5 commit 83a82b29915b0dcfd21dc025f22011db8e07c14a @alexreisner committed Jul 7, 2011
Showing with 2 additions and 7 deletions.
  1. +2 −7 mlbam/spider
View
@@ -108,13 +108,8 @@ toolset_name() {
# ids of games played on the given date
gameids() {
- "$league"_gameids $1
-}
-
-# ids of MLB games played on the given date
-mlb_gameids() {
- sed -n 's:.*href="\(gid_[^/"]*\)/".*:\1:p' \
- <<<"$(fetch_game_index "$(dateurl $1)/")"
+ sed -n 's:.*\(gid_[^/"]*\).*:\1:p' \
+ <<<"$(fetch_game_index "$(dateurl $1)/")" | uniq
}
# takes URL, prints content

0 comments on commit 83a82b2

Please sign in to comment.