public void SetUp() { _xPath = new XpathModel() { AllSeriesXpath = "//ul/li/a", AllChapterXpath = "//ul/li/a", ImageXpath = "//a[1]", NextLinkXpath = "//body/a[last()]" }; _objParse = new ParseHtml(_xPath); _html = new StringBuilder(); _html.Append("<HTML>"); _html.Append("<HEAD>"); _html.Append("<TITLE>Your Title Here</TITLE>"); _html.Append("</HEAD>"); _html.Append("<BODY BGCOLOR=\"FFFFFF\">"); _html.Append("<a href=\"http://testsite.com\">Link Name</a>"); _html.Append("<H1>This is a Header</H1>"); _html.Append("<H2>This is a Medium Header</H2>"); _html.Append("<ul>"); _html.Append("<li><a href=\"item1.com\">This is List item 1</a></li>"); _html.Append("<li><a href=\"item2.com\">This is List item 2</a></li>"); _html.Append("<li><a href=\"item3.com\">This is List item 3</a></li>"); _html.Append("<li><a href=\"item4.com\">This is List item 4</a></li>"); _html.Append("</ul>"); _html.Append("Send me mail at <a href=\"mailto:[email protected]\">[email protected]</a>."); _html.Append("<P> This is a new paragraph!"); _html.Append("<P> <B>This is a new paragraph!</B>)"); _html.Append("<BR> <B><I>This is a new sentence without a paragraph break, in bold italics.</I></B>"); _html.Append("<HR>"); _html.Append("</BODY>"); _html.Append("</HTML>"); }
public GetEpub(IParseHtml parseHtml, IGetWikiPageRecords getRecords, IGetXmlDocs getXmlDocs, IHtmlInput htmlInput, IEpubOutput epubOutput) { _parseHtml = parseHtml; _getRecords = getRecords; _getXmlDocs = getXmlDocs; _htmlInput = htmlInput; _epubOutput = epubOutput; }
internal Scrapper(IParseHtml parseHtml, IDownload download) { _parseHtml = parseHtml; _download = download; Selected = DomainSettings.SelectedConfiguration; if (Selected == null) { throw new MangaScrapperException("Error In Configuration Selection"); } }
public void TearDown() { _objParse = null; _html = null; }