public override void getMovieSources(string urlMovie, ref Sources sources) { string buffer = string.Empty; string keyMovie = string.Empty; List <string> lSources = new List <string>(); string urlDecoded = string.Empty; string error = string.Empty; if (0 == error.Length) { HttpManager.requestGet(urlMovie, null, ref buffer, ref error); } if (0 == error.Length) { PelispediaHelper.getKeyMovie(urlMovie, buffer, ref keyMovie, ref error); } if (0 == error.Length) { PelispediaHelper.getUrlOptions(urlMovie, keyMovie, ref buffer, ref error); } if (0 == error.Length) { PelispediaHelper.getSources(buffer, ref lSources, ref error); } if (0 == error.Length) { foreach (string source in lSources) { if (source.StartsWith("https://load.pelispedia.vip/embed")) { error = string.Empty; if (decodeSource(source, ref urlDecoded, ref error)) { ServerScrapper.scrap(urlDecoded, ref sources, ref error); } if (error.Length > 0) { runOnLog(name(), "ERROR (" + urlMovie + ")", error); } } } } else { runOnLog(name(), "ERROR (" + urlMovie + ")", error); } }
bool getEpisode(ref Episode episode, ref string error) { string buffer = string.Empty; string keyMovie = string.Empty; List <string> sources = new List <string>(); string codigo = string.Empty; string urlAux = string.Empty; if (0 == error.Length) { HttpHelper.requestGet(episode.url_web, null, ref buffer, ref error); } if (0 == error.Length) { getKeyMovie(episode.url_web, buffer, ref keyMovie, ref error); } if (0 == error.Length) { getUrlOptions(episode.url_web, keyMovie, ref buffer, ref error); } if (0 == error.Length) { getSources(episode.url_web, buffer, ref sources, ref error); } if (0 == error.Length) { foreach (string source in sources) { string url = source; if (!isHtml5(source)) { if (!HttpHelper.requestGet(source, null, ref buffer, ref error)) { break; } if (!getCode(buffer, ref codigo, ref error)) { break; } if (!decryptUrl(source, codigo, ref urlAux, ref error)) { break; } if (!HttpHelper.requestGetSinReditect(urlAux, null, ref url, ref error)) { break; } } if (!ServerScrapper.scrap(url, ref episode.sources, ref error)) { break; } } } if (error.Length > 0) { error = "ScrapPelispedia.getEpisode -> " + error; } return(0 == error.Length); }