private void runOnResult(TermPage term) { var googleSearchResults = getSearchResultsForTerm(term); var googleYouTubeResults = getYouTubeResultsForTerm(term); var postForGoogleSearchResults = BuildAllPostForGoogleSearchTerm(googleSearchResults); var postForgoogleYouTubeResults = BuildAllPostForYouTubeSearchTerm(googleYouTubeResults); var FinelsPost = postForgoogleYouTubeResults.Zip(postForGoogleSearchResults, (y, g) => addStringToPage(y, g)); foreach (var post in FinelsPost) { sendToWordpress(post); } }
private TermYouTubeEntity getYouTubeResultsForTerm(TermPage term) { return new TermYouTubeEntity { YouTubeResult = SearchYoutube.GetFromYouTube(term.Term), Term = term }; }
private Page BuildPostForYouTubeSearchTerm(YouTubeReasults termResult, TermPage term) { return new Page { Title = termResult.Title + " " + term.Term, Content = buildYouTubeIframe(termResult) + "<br>" + termResult.Description + "<br>" + SnipetReader.GetArtical(term.Term), }; }
private TermResultsGoogle getSearchResultsForTerm(TermPage term) { return new TermResultsGoogle { GoogleResult = GoogleSearchParser.SearchQuery(term.Term).ToArray<ResultsGoogle>(), Term = term }; }
private string buildInLinkUrl(TermPage term) { return String.Format("<a href =\"{0}\"> {1} </a>", BaseUrl + "" + term.PageId, term.Term); }