Skip to content

Commit 1904541

Browse files
committed
Support different regexes for the SE
1 parent a426f02 commit 1904541

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/searchEngine/gather.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ var SEARCH_ENGINE = map[string]string{"google": `https://www.google.com/search?q
1515
var REGEX_TITLE = `<h[23](.*?")?>(.*?)<\/h[23]>`
1616

1717
// REGEX_LINKEDIN is the regex to extract field from the title
18-
var REGEX_LINKEDIN = `<h[23](.*?")?>(?P<FirstName>.*?) (?P<LastName>.*?) [-–] (?P<Title>.*?) [-–] (?P<Company>.*?)(\| LinkedIn)(.*?)<\/h[23]>`
18+
var REGEX_LINKEDIN = map[string]string{"google": `<h[23](.*?")?>(?P<FirstName>.*?) (?P<LastName>.*?) [-–] (?P<Title>.*?) [-–] (?P<Company>.*?)(\| LinkedIn)(.*?)<\/h[23]>`,
19+
"bing": `<h[23](.*?")?>(?P<FirstName>.*?) (?P<LastName>.*?) [-–] (?P<Title>.*?) [-–] (?P<Company>.*?)(\| LinkedIn)(.*?)<\/h[23]>`}
1920

2021
// Gather will search a company name and returned the list of people in specified format
2122
func (options *Options) Gather() []string {

0 commit comments

Comments
 (0)