Skip to content

Commit

Permalink
Fix username/hashtag regexp
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexander Sheiko committed Dec 18, 2020
1 parent 0ad2a27 commit 5d02321
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions util.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ import (
)

var (
reHashtag = regexp.MustCompile(`\B(\#[a-zA-Z]+\b)`)
reHashtag = regexp.MustCompile(`\B(\#\w+\b)`)
reTwitterURL = regexp.MustCompile(`https:(\/\/t\.co\/([A-Za-z0-9]|[A-Za-z]){10})`)
reUsername = regexp.MustCompile(`\B(\@[a-zA-Z]+\b)`)
reUsername = regexp.MustCompile(`\B(\@\S{1,15}\b)`)
)

func (s *Scraper) newRequest(method string, url string) (*http.Request, error) {
Expand Down

0 comments on commit 5d02321

Please sign in to comment.