示例#1
0
文件: ProgramFlow.cs 项目: semlie/ads
        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);
            }
        }
示例#2
0
文件: ProgramFlow.cs 项目: semlie/ads
 private TermYouTubeEntity getYouTubeResultsForTerm(TermPage term)
 {
     return new TermYouTubeEntity
     {
         YouTubeResult = SearchYoutube.GetFromYouTube(term.Term),
         Term = term
     };
 }
示例#3
0
文件: ProgramFlow.cs 项目: semlie/ads
 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),
     };
 }
示例#4
0
文件: ProgramFlow.cs 项目: semlie/ads
 private TermResultsGoogle getSearchResultsForTerm(TermPage term)
 {
     return new TermResultsGoogle
     {
         GoogleResult = GoogleSearchParser.SearchQuery(term.Term).ToArray<ResultsGoogle>(),
         Term = term
     };
 }
示例#5
0
文件: ProgramFlow.cs 项目: semlie/ads
 private string buildInLinkUrl(TermPage term)
 {
     return String.Format("<a href =\"{0}\"> {1} </a>", BaseUrl + "" + term.PageId, term.Term);
 }