Skip to content

Commit

Permalink
Support different regexes for the SE
Browse files Browse the repository at this point in the history
  • Loading branch information
nodauf committed Dec 29, 2021
1 parent a426f02 commit 1904541
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/searchEngine/gather.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ var SEARCH_ENGINE = map[string]string{"google": `https://www.google.com/search?q
var REGEX_TITLE = `<h[23](.*?")?>(.*?)<\/h[23]>`

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

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

0 comments on commit 1904541

Please sign in to comment.