Fix username/hashtag regexp
This commit is contained in:
parent
0ad2a275ea
commit
5d02321705
1 changed files with 2 additions and 2 deletions
4
util.go
4
util.go
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue