using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using TYTD; using System.Net; using Newtonsoft.Json; namespace ReturnYTDislikes { public class ReturnDislikes : Api { public override void OnStart() { DownloadInfoStart += ReturnDislikes_DownloadInfoStart; } public override IEnumerable> GetUrls() { return new List>(); } private void ReturnDislikes_DownloadInfoStart(object sender, DownloadInfoStartEventArgs e) { using(var wc = new WebClient()) { try { e.Video.Dislikes = JsonConvert.DeserializeObject(wc.DownloadString($"https://returnyoutubedislikeapi.com/votes?videoId={e.Video.Id}")).dislikes; }catch(Exception ex) { _ = ex; } } } public class dislike { public long dislikes { get; set; } } } }