Skip to content

Commit

Permalink
中文ID
Browse files Browse the repository at this point in the history
  • Loading branch information
zhudw committed Jul 18, 2023
1 parent d99b6cd commit 259c5d8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/nlc.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,12 @@ func (r *ChinaNlc) Init(iTask int, sUrl string) (msg string, err error) {
}

func (r *ChinaNlc) getBookId(sUrl string) (bookId string) {
m := regexp.MustCompile(`identifier[\s]+=[\s]+["']([A-Za-z0-9]+)["']`).FindStringSubmatch(sUrl)
m := regexp.MustCompile(`identifier\s+=\s+["']([^"']+)["']`).FindStringSubmatch(sUrl)
if m != nil {
bookId = m[1]
return
}
m = regexp.MustCompile(`fid=([A-Za-z0-9]+)`).FindStringSubmatch(sUrl)
m = regexp.MustCompile(`fid=([A-z0-9]+)`).FindStringSubmatch(sUrl)
if m != nil {
bookId = m[1]
return
Expand Down

0 comments on commit 259c5d8

Please sign in to comment.