コード例 #1
0
ファイル: scraper.go プロジェクト: seihmd/q-o-c
func ScrapeOrgs() {
	orgs := StartScrapeOrgsList()
	mongo.UpsertOrgs(orgs)

	keywords := mongo.GetKeywords()
	updateLowerLimit(keywords)
}
コード例 #2
0
ファイル: hb_scraper.go プロジェクト: seihmd/q-o-c
func StartScrapeHb(
	getRecent bool,
	getPopular bool,
	count int,
) {
	keywords := mongo.GetKeywords()

	for _, keyword := range keywords {
		recent := []model.Entry{}
		// popular := []model.Entry{}
		log.Println(keyword.Name)
		if getRecent {
			recent = bootRobot(keyword, count, recentParams)
		}
		// if getPopular {
		// 	popular = bootRobot(keyword, count, popularParams)
		// }
		mongo.UpsertEntry(recent)
		// mongo.UpsertEntry(popular)
	}
}