Exemplo n.º 1
0
        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);
            }
        }
Exemplo n.º 2
0
 private TermYouTubeEntity getYouTubeResultsForTerm(TermPage term)
 {
     return new TermYouTubeEntity
     {
         YouTubeResult = SearchYoutube.GetFromYouTube(term.Term),
         Term = term
     };
 }
Exemplo n.º 3
0
 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),
     };
 }
Exemplo n.º 4
0
 private TermResultsGoogle getSearchResultsForTerm(TermPage term)
 {
     return new TermResultsGoogle
     {
         GoogleResult = GoogleSearchParser.SearchQuery(term.Term).ToArray<ResultsGoogle>(),
         Term = term
     };
 }
Exemplo n.º 5
0
 private string buildInLinkUrl(TermPage term)
 {
     return String.Format("<a href =\"{0}\"> {1} </a>", BaseUrl + "" + term.PageId, term.Term);
 }