public override bool run()
        {
            JobWebPageDownload mainPageJob = new JobWebPageDownload(BoxofficeUtil.getURLbyID(boxofficeId));
            mainPageJob.run();
            mainPage = mainPageJob.getResult();
            if (mainPage == null) {
                return false;
            }
            JobWebPageDownload weekEndPageJob = new JobWebPageDownload(BoxofficeUtil.getWeekendpageURL(boxofficeId));
            weekEndPageJob.run();
            weekendPage = weekEndPageJob.getResult();
            if (weekendPage == null) {
                return false;
            }
            JobWebPageDownload foreignPageJob = new JobWebPageDownload(BoxofficeUtil.getForeignPageURL(boxofficeId));
            foreignPageJob.run();
            foreignPage = foreignPageJob.getResult();
            if (foreignPage == null) {
                return false;
            }
            JobBoxofficeMovieParser pjob = new JobBoxofficeMovieParser(mainPage,foreignPage, weekendPage, movieData);
            pjob.run();

            return true;
        }
Exemplo n.º 2
0
        public override bool run()
        {
            JobWebPageDownload mainPageJob = new JobWebPageDownload(IMDBUtil.getURLToName(person.imdbID));
            mainPageJob.run();
            this.mainPage = mainPageJob.getResult();
            if (mainPage == null) {
                return false;
            }
            JobLoadImage pictureJob = getPictureLoadJob();
            if (pictureJob != null) {
                pictureJob.run();
                person.image = pictureJob.getResult();
            }

            JobIMDBNameParser parseJob = new JobIMDBNameParser(mainPage, person);
            parseJob.run();
            return true;
        }