Esempio n. 1
0
 private IEnumerable<VideoLink> GetVideoLink(IList<HtmlNode> cells)
 {
     foreach (var column in TwitchIndexes)
     {
         var linkNode = cells[column].Element("a");
         var url = RemoveSpoilerFreeVideoUrl(linkNode.Attributes["href"].Value);
         var twitchUrlParser = new TwitchUrlParser(url);
         yield return new VideoLink
         {
             Title = HttpUtility.HtmlDecode(linkNode.InnerText),
             TwitchId = twitchUrlParser.Id,
             TimeStart = twitchUrlParser.TimeStart
         };
     }
 }
Esempio n. 2
0
 private static VideoLink GetFullStreamVideoLink(string title, string fullStreamUrl)
 {
     if (string.IsNullOrEmpty(fullStreamUrl))
     {
         return null;
     }
     var twitchUrlParser = new TwitchUrlParser(fullStreamUrl);
     return new VideoLink
     {
         Title = "Full stream: " + title,
         TwitchId = twitchUrlParser.Id,
         TimeStart = twitchUrlParser.TimeStart
     };
 }