feat: implement multiple new job crawlers and add corresponding test suites
This commit is contained in:
@@ -15,9 +15,19 @@ import (
|
||||
"github.com/hireme/hireme/internal/db"
|
||||
"github.com/hireme/hireme/internal/filter"
|
||||
"github.com/hireme/hireme/internal/logger"
|
||||
"github.com/hireme/hireme/pkg/crawler/amazon"
|
||||
"github.com/hireme/hireme/pkg/crawler/apple"
|
||||
"github.com/hireme/hireme/pkg/crawler/bytedance"
|
||||
"github.com/hireme/hireme/pkg/crawler/databricks"
|
||||
"github.com/hireme/hireme/pkg/crawler/google"
|
||||
"github.com/hireme/hireme/pkg/crawler/linkedin"
|
||||
"github.com/hireme/hireme/pkg/crawler/meta"
|
||||
"github.com/hireme/hireme/pkg/crawler/microsoft"
|
||||
"github.com/hireme/hireme/pkg/crawler/netflix"
|
||||
"github.com/hireme/hireme/pkg/crawler/nvidia"
|
||||
"github.com/hireme/hireme/pkg/crawler/snowflake"
|
||||
"github.com/hireme/hireme/pkg/crawler/stripe"
|
||||
"github.com/hireme/hireme/pkg/crawler/uber"
|
||||
)
|
||||
|
||||
type WorkerPool struct {
|
||||
@@ -347,5 +357,35 @@ func (p *WorkerPool) getCrawlerForPlatform(platform string) crawler.SiteCrawler
|
||||
if strings.Contains(plat, "meta") || strings.Contains(plat, "facebook") {
|
||||
return meta.NewMetaCrawler()
|
||||
}
|
||||
if strings.Contains(plat, "amazon") || strings.Contains(plat, "aws") {
|
||||
return amazon.NewAmazonCrawler()
|
||||
}
|
||||
if strings.Contains(plat, "microsoft") || strings.Contains(plat, "azure") {
|
||||
return microsoft.NewMicrosoftCrawler()
|
||||
}
|
||||
if strings.Contains(plat, "bytedance") || strings.Contains(plat, "tiktok") {
|
||||
return bytedance.NewByteDanceCrawler()
|
||||
}
|
||||
if strings.Contains(plat, "nvidia") {
|
||||
return nvidia.NewNvidiaCrawler()
|
||||
}
|
||||
if strings.Contains(plat, "netflix") {
|
||||
return netflix.NewNetflixCrawler()
|
||||
}
|
||||
if strings.Contains(plat, "uber") {
|
||||
return uber.NewUberCrawler()
|
||||
}
|
||||
if strings.Contains(plat, "linkedin") {
|
||||
return linkedin.NewLinkedInCrawler()
|
||||
}
|
||||
if strings.Contains(plat, "stripe") {
|
||||
return stripe.NewStripeCrawler()
|
||||
}
|
||||
if strings.Contains(plat, "databricks") {
|
||||
return databricks.NewDatabricksCrawler()
|
||||
}
|
||||
if strings.Contains(plat, "snowflake") {
|
||||
return snowflake.NewSnowflakeCrawler()
|
||||
}
|
||||
return crawler.NewGenericCrawler()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user