protected function FreeDL($step = 1) { if ($step == 3 && empty($_POST['step'])) { $step = 2; } return parent::FreeDL($step); }
protected function getFileName($url) { $fname = parent::getFileName($url); if (preg_match("@^(?:v(?:ideo)|{$this->fid})?\\.(mp4|flv)\$@i", $fname, $vExt) && preg_match('@<h3>Watch\\s+([^\\s<>\\"\']+)\\s*</h3>@i', $this->page, $title)) { $fname = preg_replace('@\\.(mp4|flv|mkv|webm|wmv|(m2)?ts|rm(vb)?|mpe?g?|vob|avi|[23]gp)$@i', '', trim($title[1])) . '_S.' . strtolower($vExt[1]); } return $fname; }
protected function testDL($name = '') { if (strpos($this->page, "jwplayer('container').setup({") !== false) { // Removing the http will avoid to be catched by the download regexp and download with a wrong name. $this->page = str_replace("file: 'http", "file: 'xxxx", $this->page); } return parent::testDL($name); }
protected function FindPost($formOp = 0) { // I don't know why it's that comment just when there should be that </form> $this->page = str_replace('<!-- Family-safe ads -->', '</form>', $this->page); if (empty($formOp)) { return parent::FindPost(); } else { return parent::FindPost($formOp); } }
protected function findCountdown() { if (parent::findCountdown()) { return true; } if (stripos($this->page, 'Happy hour!!!')) { $this->CountDown(3); // I still do get some Skipped CountDown even with longer countdowns it may be a bug at the site at "happy hour". return true; } return false; }
protected function testDL($name = '') { if (preg_match('@(https?://(?:[\\w\\-]+\\.)+[\\w\\-]+(?:\\:\\d+)?/)i/(?:[^/\\s\\"\'<>]+/)*\\w{12}(_t)?\\.jpe?g@i', $this->page, $SV) && preg_match('@[?&]h(?:ash)?=(\\w+)@i', $this->page, $hash)) { $DL = $SV[1] . $hash[1] . '/v.mp4'; // And that's how a XFS video download link is forged. if (empty($name)) { $name = $this->getFileName($DL[0]); } $this->RedirectDownload($DL, basename($name)); return true; } return parent::testDL($name); // Keep trying original method. }
protected function checkLogin($page) { is_present($page, '>Wrong captcha code<', 'Error: Error Decoding Captcha. [Login]'); return parent::checkLogin($page); }