예제 #1
0
 function __construct($html, $host)
 {
     $this->html = $html;
     switch ($host) {
         case 'tsn.ua':
             $this->parseMethodNmae = 'tsn';
             break;
         case 'korrespondent.net':
             $this->parseMethodNmae = 'korrespondent';
             break;
         case 'www.segodnya.ua':
             $this->parseMethodNmae = 'segodnya';
             break;
         case 'www.unn.com.ua':
             $this->parseMethodNmae = 'unn';
             break;
         case 'www.unian.net':
             $this->parseMethodNmae = 'unian';
             break;
         case 'liga.net':
             $this->parseMethodNmae = 'news_liga';
             break;
         case 'interfax.com.ua':
             $this->parseMethodNmae = 'interfax';
             break;
         case 'sport.segodnya.ua':
             $this->parseMethodNmae = 'segodnya';
             break;
         case 'delo.ua':
             $this->parseMethodNmae = 'delo';
             break;
         case 'focus.ua':
             $this->parseMethodNmae = 'focus';
             break;
         case 'isport.ua':
             $this->parseMethodNmae = 'isport';
             break;
         case 'compulenta.computerra.ru':
             $this->parseMethodNmae = 'compulenta';
             $this->html = parse_lib::validHTML($html);
             break;
         case 'itc.ua':
             $this->parseMethodNmae = 'itc';
             break;
         default:
             $this->parseMethodNmae = false;
     }
 }
예제 #2
0
 function predParseHTML($html)
 {
     return parse_lib::validHTML($html);
 }