public allResults gatherAllData(string inputkeyword) { allResults allData = new allResults(); float competition = -1; try { //fetch results page for desired keyword ONE time to prevent bans //Note: SEOTC is a completely separate search (intitle: keyword) string resultsPage = getSERP(inputkeyword); //get top 10 urls List <string> top10 = getTop10(resultsPage); //this will store the urls plus the extra information we need List <topSite> top10Details = new List <topSite>(); foreach (string site in top10) { topSite newSite = new topSite(); newSite.setPR(fetchPR(site)); newSite.setAge(fetchDA(site)); newSite.setURL(site); //newSite.setBacklinks = newSite.setDmozListed(checkDMOZ(site)); top10Details.Add(newSite); } //analyze keyword counts for every site in top 10 top10Details = analyzeKeywordCount(top10Details, inputkeyword); keyword keyword = new keyword(); keyword.setName(inputkeyword); keyword.setSeoc(fetchSEOC(keyword.getName())); keyword.setSeotc(fetchSEOTC(keyword.getName())); allData.setKeyword(keyword); allData.setTop10(top10Details); //competition = analyzeComp(top10Details, inputkeyword); } catch (Exception ex) { } return(allData); }
public allResults gatherAllData(string inputkeyword) { allResults allData = new allResults(); float competition = -1; try { //fetch results page for desired keyword ONE time to prevent bans //Note: SEOTC is a completely separate search (intitle: keyword) string resultsPage = getSERP(inputkeyword); //get top 10 urls List<string> top10 = getTop10(resultsPage); //this will store the urls plus the extra information we need List<topSite> top10Details = new List<topSite>(); foreach (string site in top10) { topSite newSite = new topSite(); newSite.setPR(fetchPR(site)); newSite.setAge(fetchDA(site)); newSite.setURL(site); //newSite.setBacklinks = newSite.setDmozListed(checkDMOZ(site)); top10Details.Add(newSite); } //analyze keyword counts for every site in top 10 top10Details = analyzeKeywordCount(top10Details, inputkeyword); keyword keyword = new keyword(); keyword.setName(inputkeyword); keyword.setSeoc(fetchSEOC(keyword.getName())); keyword.setSeotc(fetchSEOTC(keyword.getName())); allData.setKeyword(keyword); allData.setTop10(top10Details); //competition = analyzeComp(top10Details, inputkeyword); } catch (Exception ex) { } return allData; }