Example #1
0
        public void TestExtractResponseHandler()
        {
            var erh = new ExtractResponseHandler <HTMLExtractPage>("https://www.wikipedia.org");
            var er  = erh.RequestSingle("Google");

            Assert.IsNotNull(er);
            Assert.IsInstanceOfType(er, typeof(IExtractPage));
            Assert.IsNotNull(er.Extract);
            Assert.IsNotNull(er.ExtractInterpreter);
            Assert.IsNotNull(er.ExtractInterpreter.Sections);
            Assert.IsTrue(er.ExtractInterpreter.Sections.Count > 0);
            var erl = erh.RequestMany("Google", "Google Drive");

            Assert.IsNotNull(erl);
            Assert.IsInstanceOfType(erl, typeof(IEnumerable <IExtractPage>));
        }
Example #2
0
 public IReadOnlyList <Section> GetSections(string pageTitle)
 {
     return(extractResponseHandler.RequestSingle(pageTitle).ExtractInterpreter.Sections);
 }