def getUnigoLeadsAndInsertIntoDB():
     unigoLeadsArrays = UnigoLeads().getLeads()
     predictedFundingTypes = ProcessUnigoLeads.classifyFunding(unigoLeadsArrays)
     totalLeads = len(unigoLeadsArrays)
     numNewEntries = 0
     numUpdates = 0
     for leadArray, fundingClassification in zip(unigoLeadsArrays, predictedFundingTypes):
         badScholarshipClassification = ProcessUnigoLeads.checkBadScholarship(leadArray, fundingClassification)
         newEntryBoolean = InsertUnigoLeadArrayIntoUnigoLeadsDB(leadArray, fundingClassification,
                                                                badScholarshipClassification).insertUpdateLead()
         if newEntryBoolean:
             numNewEntries += 1
         else:
             numUpdates += 1
     CerebroLogs('Unigo', totalLeads, numNewEntries, numUpdates)
 def getGrantForwardLeadsInsertIntoDB():
     majorsList = GetFastFindMajorsList.getGrantForwardItemsList()
     for major in majorsList:
         grantForwardLeadsArrays = GrantForwardLeads(major).processSearchResultsAndMakeLeadArray()
         predictedFundingTypes = ProcessGrantForwardLeads.classifyFunding(grantForwardLeadsArrays)
         totalLeads = len(grantForwardLeadsArrays)
         numNewEntries = 0
         numUpdates = 0
         for leadArray, fundingClassification in zip(grantForwardLeadsArrays, predictedFundingTypes):
             badScholarshipClassification = ProcessGrantForwardLeads.checkBadScholarship(leadArray,
                                                                                         fundingClassification)
             newEntryBoolean = InsertGrantForwardLeadsArrayIntoGrantForwardItems(leadArray, fundingClassification,
                                                                                 badScholarshipClassification).insertUpdateLead()
             if newEntryBoolean == True:
                 numNewEntries += 1
             else:
                 numUpdates += 1
         CerebroLogs('GrantForward', totalLeads, numNewEntries, numUpdates,
                     useDifferentWebsiteName='GrantForward (%s)' % major)
Beispiel #3
0
 def getScholarsiteLeadsAndInsertIntoDB():
     scholarsiteLeadsArrays = ScholarsiteLeads().processResultsPages()
     predictedFundingTypes = ProcessScholarsiteLeads.classifyFunding(
         scholarsiteLeadsArrays)
     totalLeads = len(scholarsiteLeadsArrays)
     numNewEntries = 0
     numUpdates = 0
     for leadArray, fundingClassification in zip(scholarsiteLeadsArrays,
                                                 predictedFundingTypes):
         badScholarshipClassification = ProcessScholarsiteLeads.checkBadScholarship(
             leadArray, fundingClassification)
         newEntryBoolean = InsertScholarsiteLeadsArrayIntoScholarsiteLeadsDB(
             leadArray, fundingClassification,
             badScholarshipClassification).insertUpdateLead()
         if newEntryBoolean:
             numNewEntries += 1
         else:
             numUpdates += 1
     CerebroLogs('Scholarsite', totalLeads, numNewEntries, numUpdates)
 def getCheggLeadsAndInsertIntoDB():
     cheggLeadsArrays = CheggLeads().loopOverResultsPagesAndDoStuff()
     predictedFundingTypes = ProcessCheggLeads.classifyFunding(
         cheggLeadsArrays)
     totalLeads = len(cheggLeadsArrays)
     numNewEntries = 0
     numUpdates = 0
     for leadArray, fundingClassification in zip(cheggLeadsArrays,
                                                 predictedFundingTypes):
         badScholarshipClassification = ProcessCheggLeads.checkBadScholarship(
             leadArray, fundingClassification)
         newEntryBoolean = InsertCheggLeadArrayIntoCheggLeadsDB(
             leadArray, fundingClassification,
             badScholarshipClassification).insertUpdateLead()
         if newEntryBoolean:
             numNewEntries += 1
         else:
             numUpdates += 1
     CerebroLogs('Chegg', totalLeads, numNewEntries, numUpdates)
 def getTeacherDotOrgLeadsAndInsertIntoDB():
     teacherDotOrgLeadArrays = TeacherDotOrgLeads().getLeads()
     predictedFundingTypes = ProcessTeacherDotOrgLeads.classifyFunding(
         teacherDotOrgLeadArrays)
     totalLeads = len(teacherDotOrgLeadArrays)
     numNewEntries = 0
     numUpdates = 0
     for leadArray, fundingClassification in zip(teacherDotOrgLeadArrays,
                                                 predictedFundingTypes):
         badScholarshipClassification = ProcessTeacherDotOrgLeads.checkBadScholarship(
             leadArray, fundingClassification)
         newEntryBoolean = InsertTeacherDotOrgLeadArrayIntoTeacherDotOrgDB(
             leadArray, fundingClassification,
             badScholarshipClassification).insertUpdateLead()
         if newEntryBoolean:
             numNewEntries += 1
         else:
             numUpdates += 1
     CerebroLogs('TeacherDotOrg', totalLeads, numNewEntries, numUpdates)
Beispiel #6
0
 def getCollegeGreenLightLeadsAndInsertIntoDB():
     collegeGreenLightLeadsArrays = CollegeGreenLightLeads().getLeads()
     predictedFundingTypes = ProcessCollegeGreenLightLeads.classifyFunding(
         collegeGreenLightLeadsArrays)
     totalLeads = len(collegeGreenLightLeadsArrays)
     numNewEntries = 0
     numUpdates = 0
     for leadArray, fundingClassification in zip(
             collegeGreenLightLeadsArrays, predictedFundingTypes):
         badScholarshipClassification = ProcessCollegeGreenLightLeads.checkBadScholarship(
             leadArray, fundingClassification)
         newEntryBoolean = InsertCollegeGreenLightLeadArrayIntoCollegeGreenLightDB(
             leadArray, fundingClassification,
             badScholarshipClassification).insertUpdateLead()
         if newEntryBoolean:
             numNewEntries += 1
         else:
             numUpdates += 1
     CerebroLogs('CollegeGreenLight', totalLeads, numNewEntries, numUpdates)
Beispiel #7
0
 def getFatomeiLeadsAndInsertIntoDB():
     fatomeiLeadsArrays = FatomeiLeads().getFatomeiLeadsArrays()
     predictedFundingTypes = ProcessFatomeiLeads.classifyFunding(
         fatomeiLeadsArrays)
     totalLeads = len(fatomeiLeadsArrays)
     numNewEntries = 0
     numUpdates = 0
     for leadArray, fundingClassification in zip(fatomeiLeadsArrays,
                                                 predictedFundingTypes):
         badScholarshipClassification = ProcessFatomeiLeads.checkBadScholarship(
             leadArray, fundingClassification)
         newEntryBoolean = InsertFatomeiLeadsArrayIntoFatomeiLeadsDB(
             leadArray, fundingClassification,
             badScholarshipClassification).insertUpdateLead()
         if newEntryBoolean == True:
             numNewEntries += 1
         else:
             numUpdates += 1
     CerebroLogs('Fatomei', totalLeads, numNewEntries, numUpdates)
Beispiel #8
0
 def getScholarships360LeadsAndInsertIntoDatabase():
     arrayOfScholarship360Leads = Scholarships360Leads().getLeads()
     predictedFundingTypes = ProcessScholarships360Leads.classifyFunding(
         arrayOfScholarship360Leads)
     totalLeads = len(arrayOfScholarship360Leads)
     numNewEntries = 0
     numUpdates = 0
     for leadArray, fundingClassification in zip(arrayOfScholarship360Leads,
                                                 predictedFundingTypes):
         badScholarshipClassification = ProcessScholarships360Leads.checkBadScholarship(
             leadArray, fundingClassification)
         newEntryBoolean = InsertScholarships360LeadArrayIntoScholarships360DB(
             leadArray, fundingClassification,
             badScholarshipClassification).insertUpdateLead()
         if newEntryBoolean:
             numNewEntries += 1
         else:
             numUpdates += 1
     CerebroLogs('Scholarships360', totalLeads, numNewEntries, numUpdates)