/// <summary> /// Scrapes the Cast collection. /// </summary> /// <param name="id">The MovieUniqueId for the scraper.</param> /// <param name="threadID">The thread MovieUniqueId.</param> /// <param name="output">The scraped Cast value.</param> /// <param name="logCatagory">The log catagory.</param> /// <returns>Scrape succeeded [true/false]</returns> public new bool ScrapeCast(string id, int threadID, out BindingList <PersonModel> output, string logCatagory) { output = new BindingList <PersonModel>(); try { var htmlBlock = YRegex.Match( @"<h4>Skådespelare</h4>(?<castblock>.*?)</div>", this.GetHtml("main", threadID, id), "castblock", true); output = YRegex.MatchesToPersonList( @"<a href='.*?'>(?<name>.*?)</a>\s-\s(?<role>.*?)</h5>", htmlBlock, "name", "role"); return(output.IsFilled()); } catch (Exception ex) { Log.WriteToLog(LogSeverity.Error, threadID, logCatagory, ex.Message); return(false); } }
/// <summary> /// Scrapes the writers value /// </summary> /// <param name="id">The MovieUniqueId for the scraper.</param> /// <param name="threadID">The thread MovieUniqueId.</param> /// <param name="output">The scraped runtime value.</param> /// <param name="logCatagory">The log catagory.</param> /// <returns>Scrape succeeded [true/false]</returns> public new bool ScrapeWriters(string id, int threadID, out BindingList <PersonModel> output, string logCatagory) { output = new BindingList <PersonModel>(); try { var htmlBlock = YRegex.Match( @"<h4>Manus</h4>(?<writerblock>.*?)</div>", this.GetHtml("main", threadID, id), "writerblock"); output = YRegex.MatchesToPersonList( @"<.*?><h5><a\shref='.*?'>(?<writer>.*?)</a></h5><.*?>", htmlBlock, "writer", true); return(output.IsFilled()); } catch (Exception ex) { Log.WriteToLog(LogSeverity.Error, threadID, logCatagory, ex.Message); return(false); } }
/// <summary> /// Scrapes the Cast collection. /// </summary> /// <param name="id">The MovieUniqueId for the scraper.</param> /// <param name="threadID">The thread MovieUniqueId.</param> /// <param name="output">The scraped Cast value.</param> /// <param name="logCatagory">The log catagory.</param> /// <returns>Scrape succeeded [true/false]</returns> public new bool ScrapeCast(string id, int threadID, out BindingList <PersonModel> output, string logCatagory) { output = new BindingList <PersonModel>(); try { output = YRegex.MatchesToPersonList( ">(?<name>.{0,40}?)</a></td><td class=\"ddd\"> ... </td><td class=\"char\">(?<role>.*?)</td>", this.GetHtml("main", threadID, id), "name", "role", "imgurl"); foreach (var p in output) { p.Name = p.Name.Replace("...", string.Empty).Trim(); if (!p.ImageUrl.Contains("SX400")) { p.ImageUrl = string.Empty; } } return(output.IsFilled()); } catch (Exception ex) { Log.WriteToLog(LogSeverity.Error, threadID, logCatagory, ex.Message); return(false); } }
/// <summary> /// Scrapes the Cast collection. /// </summary> /// <param name="id">The MovieUniqueId for the scraper.</param> /// <param name="threadID">The thread MovieUniqueId.</param> /// <param name="output">The scraped Cast value.</param> /// <param name="logCatagory">The log catagory.</param> /// <returns>Scrape succeeded [true/false]</returns> public new bool ScrapeCast(string id, int threadID, out BindingList <PersonModel> output, string logCatagory) { output = new BindingList <PersonModel>(); try { var htmlBlock = YRegex.Match( @"<th scope=""col"">Bohater</th>(?<actorblock>.*?)zobacz więcej", this.GetHtml("main", threadID, id), "actorblock"); htmlBlock = Regex.Replace(htmlBlock.Replace("\t", string.Empty), @"\s{2,}", " "); output = YRegex.MatchesToPersonList( @"<img.*?rc=""(?<thumb>.*?)""\stitle="".*?""\salt=.*?>\s(?<name>.*?)</a></td>\s<td.*?>\s(?<role>.*?)\s<s.*?</tr>", htmlBlock, "name", "role", "thumb"); return(output.IsFilled()); } catch (Exception ex) { Log.WriteToLog(LogSeverity.Error, threadID, logCatagory, ex.Message); return(false); } }
/// <summary> /// Scrapes the Cast collection. /// </summary> /// <param name="id">The Id for the scraper.</param> /// <param name="threadID">The thread MovieUniqueId.</param> /// <param name="output">The scraped Cast value.</param> /// <param name="logCatagory">The log catagory.</param> /// <returns>Scrape succeeded [true/false]</returns> public new bool ScrapeCast(string id, int threadID, out BindingList <PersonModel> output, string logCatagory) { output = new BindingList <PersonModel>(); try { var html = this.GetHtml("cast", threadID, id); var castBlockHtml = YRegex.Match(@"Darsteller(?<castblock>.*?)Drehbuchautor", html, "castblock"); output = YRegex.MatchesToPersonList( @"src=""thumbnail\.php\?cover=(?<image>.*?)&size=6"".*?<b>(?<name>.*?)</b>.*?\.\.\.(?<role>.*?)</font></td>", castBlockHtml, "name", "role", "image"); return(output.IsFilled()); } catch (Exception ex) { Log.WriteToLog(LogSeverity.Error, threadID, logCatagory, ex.Message); return(false); } }
/// <summary> /// Scrapes the writers value /// </summary> /// <param name="id">The MovieUniqueId for the scraper.</param> /// <param name="threadID">The thread MovieUniqueId.</param> /// <param name="output">The scraped runtime value.</param> /// <param name="logCatagory">The log catagory.</param> /// <returns>Scrape succeeded [true/false]</returns> public new bool ScrapeWriters(string id, int threadID, out BindingList <PersonModel> output, string logCatagory) { output = new BindingList <PersonModel>(); try { output = YRegex.MatchesToPersonList( @"reżyseria:(?<writer>.*?)scenariusz", this.GetHtml("main", threadID, id), "writer", true); return(output.IsFilled()); } catch (Exception ex) { Log.WriteToLog(LogSeverity.Error, threadID, logCatagory, ex.Message); return(false); } }
/// <summary> /// Scrapes the Cast collection. /// </summary> /// <param name="id">The MovieUniqueId for the scraper.</param> /// <param name="threadID">The thread MovieUniqueId.</param> /// <param name="output">The scraped Cast value.</param> /// <param name="logCatagory">The log catagory.</param> /// <returns>Scrape succeeded [true/false]</returns> public new bool ScrapeCast(string id, int threadID, out BindingList <PersonModel> output, string logCatagory) { output = new BindingList <PersonModel>(); try { output = YRegex.MatchesToPersonList( @"<img width=38 height=50 src=""(?<thumb>.{30,50})"" alt="".*?""></span>\s(?<name>.*?)\s</a></h3><div>\s(?<role>.*?)\s</div>", this.GetHtml("main", threadID, id), "name", "role", "thumb"); return(output.IsFilled()); } catch (Exception ex) { Log.WriteToLog(LogSeverity.Error, threadID, logCatagory, ex.Message); return(false); } }
/// <summary> /// Scrapes the Director value /// </summary> /// <param name="id">The MovieUniqueId for the scraper.</param> /// <param name="threadID">The thread MovieUniqueId.</param> /// <param name="output">The scraped Director value.</param> /// <param name="logCatagory">The log catagory.</param> /// <returns>Scrape succeeded [true/false]</returns> public new bool ScrapeDirector(string id, int threadID, out BindingList <PersonModel> output, string logCatagory) { output = new BindingList <PersonModel>(); try { output = YRegex.MatchesToPersonList( "режиссер</td><td>(?<director>.*?)</td>", this.GetHtml("main", threadID, id), "director", true); return(output.IsFilled()); } catch (Exception ex) { Log.WriteToLog(LogSeverity.Error, threadID, logCatagory, ex.Message); return(false); } }
/// <summary> /// Scrapes the writers value /// </summary> /// <param name="id">The MovieUniqueId for the scraper.</param> /// <param name="threadID">The thread MovieUniqueId.</param> /// <param name="output">The scraped runtime value.</param> /// <param name="logCatagory">The log catagory.</param> /// <returns>Scrape succeeded [true/false]</returns> public new bool ScrapeWriters(string id, int threadID, out BindingList <PersonModel> output, string logCatagory) { output = new BindingList <PersonModel>(); try { output = YRegex.MatchesToPersonList( @"writerlist/(.*?)"">(?<name>.*?)</a>(?<role>.*?)<br", this.GetHtml("main", threadID, id), "name", "role"); return(output.IsFilled()); } catch (Exception ex) { Log.WriteToLog(LogSeverity.Error, threadID, logCatagory, ex.Message); return(false); } }
/// <summary> /// Scrapes the Cast collection. /// </summary> /// <param name="id">The MovieUniqueId for the scraper.</param> /// <param name="threadID">The thread MovieUniqueId.</param> /// <param name="output">The scraped Cast value.</param> /// <param name="logCatagory">The log catagory.</param> /// <returns>Scrape succeeded [true/false]</returns> public new bool ScrapeCast(string id, int threadID, out BindingList <PersonModel> output, string logCatagory) { output = new BindingList <PersonModel>(); try { output = YRegex.MatchesToPersonList( "Cast.*?=\"2\">(?<cast>.*?)</f", this.GetHtml("main", threadID, id), "genre", true); return(output.IsFilled()); } catch (Exception ex) { Log.WriteToLog(LogSeverity.Error, threadID, logCatagory, ex.Message); return(false); } }
/// <summary> /// Scrapes the writers value /// </summary> /// <param name="id">The Id for the scraper.</param> /// <param name="threadID">The thread MovieUniqueId.</param> /// <param name="output">The scraped runtime value.</param> /// <param name="logCatagory">The log catagory.</param> /// <returns> /// Scrape succeeded [true/false] /// </returns> public new bool ScrapeWriters(string id, int threadID, out BindingList <PersonModel> output, string logCatagory) { output = new BindingList <PersonModel>(); try { var html = this.GetHtml("cast", threadID, id); var directorBlockHtml = YRegex.Match(@"Drehbuchautor\(in\)(?<directorblock>.*?)Produzent\(in\)", html, "castblock"); output = YRegex.MatchesToPersonList(@"<a href=""view\.php\?page=person&id=\d*?""><b>(?<name>.*?)</b>", directorBlockHtml, "name", string.Empty); return(output.IsFilled()); } catch (Exception ex) { Log.WriteToLog(LogSeverity.Error, threadID, logCatagory, ex.Message); return(false); } }