예제 #1
0
            public void Start(object[] args)
            {
                this._searching = true;
                this._scraper = new MTScraper.Core(100, 1000);

                string q = String.Empty;

                switch ((String)args[1])
                {
                    case "Personals":
                        ST.Personals p = new ST.Personals();
                        q = p.Build(new object[] { 1, 25, false, false });
                        break;

                    case "Housing":
                        ST.Housing h = new ST.Housing();
                        q = h.Build(new object[] { });
                        break;

                    case "Gigs":
                        ST.Gigs g = new ST.Gigs();
                        q = g.Build(new object[] { });
                        break;

                    case "Jobs":
                        ST.Jobs j = new ST.Jobs();
                        q = j.Build(new object[] { });
                        break;

                    case "For Sale":
                        ST.ForSale f = new ST.ForSale();
                        q = f.Build(new object[] { });
                        break;

                    default:
                        ST.Default d = new ST.Default();
                        q = d.Build(new object[] { });
                        break;
                }

                _url = String.Format("{0}/search/{1}?{2}{3}", args[0], args[2], formatKeyWord((String)args[3]), q);

                //MessageBox.Show(_url);

                this._scraper.getSource(_url, scrapeSource);
            }
예제 #2
0
 internal void stop()
 {
     this._searching = false;
     this._scraper.destroy();
     this._scraper = null;
 }