The forum is here for legacy reasons. No new posts will be created. User registration is disabled! If you have any questions, please email us or check https://www.adultscriptpro.com for more details!
You are not logged in.
Pages: 1
there is few grabbers sites stop working....i didnt test one by one yet.... i have fix xhamster.
if you find some other email me and i will fix
xhamster fix file_get
on line 112 replace all function get_file() with this code
private function get_file()
{
preg_match('/"sources":{"mp4":[{"url":"(.*?)"isHD":true},/', $this->html, $match);
if (!isset($match['1']) or !$match['1']) {
preg_match('/{"url":"(.*?)"480p"},/', $this->html, $match);
if (!isset($match['1']) or !$match['1']) {
preg_match('/{"url":"(.*?)":"240p"}]}/', $this->html, $match);
}
}
$replace = "\\";
if (isset($match['1']) && $match['1']) {
return str_replace($replace,'',$match['1']);
}
$this->error = $this->errors['file_error'];
}
Thanks
Last edited by thiva7 (2017-09-14 11:38:47)
Offline
Do you mean in admin/modules/graber/grabers/xhamster.php to replace
private function get_file()
{
preg_match("/file: '(.*?)',/", $this->html, $match);
if (isset($match['1'])) {
return $match['1'];
}
preg_match('/type=\'video\/mp4\' file="(.*?)"/', $this->html, $match);
if (isset($match['1'])) {
return $match['1'];
}
$server = null;
preg_match('/srv=(.*?)\&/', $this->html, $match);
if (isset($match['1']) && $match['1']) {
$server = urldecode($match['1']).'/key=';
}
preg_match('/file=(.*?)&/', $this->html, $match);
if (isset($match['1']) && $match['1']) {
if (strpos($match['1'], 'http://') !== false) {
$server = null;
}
return $server.urldecode($match['1']).'.mp4';
}
return FALSE;
}
BY
private function get_file()
{
preg_match('/"sources":{"mp4":[{"url":"(.*?)"isHD":true},/', $this->html, $match);
if (!isset($match['1']) or !$match['1']) {
preg_match('/{"url":"(.*?)"480p"},/', $this->html, $match);
if (!isset($match['1']) or !$match['1']) {
preg_match('/{"url":"(.*?)":"240p"}]}/', $this->html, $match);
}
}
$replace = "\\";
if (isset($match['1']) && $match['1']) {
return str_replace($replace,'',$match['1']);
}
$this->error = $this->errors['file_error'];
}
It doesn't work for me.
Offline
hey,
since i fix grabber my self and am using only 1-3 sites i dont ask adrian for new version.
as i see both codes work for me.
i test each code and get files source
Offline
Would it be possible to send me the whole xhamster file?
Thank you.
Offline
Would it be possible to send me the whole xhamster file?
Thank you.
i cant send you email via asp forum so i put all code here...just copy paste it
<?php
defined('_VALID') or die('Restricted Access!');
class VGraber_xhamster
{
private $url;
private $html;
private $video;
private $error = FALSE;
private $errors = array(
'html_error' => 'Failed to get html for the requested url!',
'title_error' => 'Failed to get video title!',
'category_error' => 'Failed to get video category!',
'tags_error' => 'Failed to get video tags!',
'file_error' => 'Failed to get video file!'
);
public function __construct($url)
{
$this->url = $url;
}
public function process()
{
$this->get_html($this->url);
if (!$this->error) {
$this->video['title'] = $this->get_title();
$this->video['description'] = $this->get_description();
$this->video['tags'] = $this->get_tags();
$this->video['category'] = $this->get_category();
$this->video['file'] = $this->get_file();
$this->video['size'] = $this->get_size();
}
}
public function get_video()
{
return $this->video;
}
public function get_html($url)
{
if (!$this->html = VCurl::string($url)) {
$this->error = $this->errors['html_error'];
}
$this->html = str_replace(array("\n", "\r"), '', $this->html);
$this->html = preg_replace('/\s\s+/', ' ', $this->html);
}
public function is_error()
{
return ($this->error) ? TRUE : FALSE;
}
public function get_error()
{
return $this->error;
}
private function get_title()
{
preg_match('/<h1 itemprop="name">(.*?)<\/h1>/', $this->html, $match);
if (isset($match['1']) && $match['1']) {
return e(strip_tags(str_replace(' - xHamster.com', '', $match['1'])));
}
$this->error = $this->errors['title_error'];
}
private function get_description()
{
preg_match('/<span>Description:<\/span>(.*?)Comment please/', $this->html, $match);
if (isset($match['1']) && $match['1']) {
return e(strip_tags($match['1']));
}else{
return $this->get_title();
}
}
private function get_tags()
{
preg_match('/<span>Categories:<\/span><\/td><td>(.*?)<\/td>/', $this->html, $match);
if (isset($match['1']) && $match['1']) {
preg_match_all('/<a title="(.*?)" href="(.*?)">(.*?)<\/a>/', $match['1'], $matches);
if (isset($matches['3']) && $matches['3']) {
return $matches['3'];
}
}
if (isset($this->video['title']) && $this->video['title'] != '') {
$array = explode(' ', utf8_strtolower($this->video['title']));
$tags = array();
foreach ($array as $string) {
if (strlen($string) >= TAG_MIN_LENGTH) {
$tags[] = $string;
}
}
return $tags;
}
$this->error = $this->errors['tags_error'];
}
private function get_category()
{
return '';
}
private function get_file()
{
preg_match("/file: '(.*?)',/", $this->html, $match);
if (isset($match['1'])) {
return $match['1'];
}
preg_match('/type=\'video\/mp4\' file="(.*?)"/', $this->html, $match);
if (isset($match['1'])) {
return $match['1'];
}
$server = null;
preg_match('/srv=(.*?)\&/', $this->html, $match);
if (isset($match['1']) && $match['1']) {
$server = urldecode($match['1']).'/key=';
}
preg_match('/file=(.*?)&/', $this->html, $match);
if (isset($match['1']) && $match['1']) {
if (strpos($match['1'], 'http://') !== false) {
$server = null;
}
return $server.urldecode($match['1']).'.mp4';
}
return FALSE;
}
private function get_size()
{
if (isset($this->video['file'])) {
return 0;
}
}
}
Offline
thanks Thiva
No problem
Offline
I just tested the grabers on my box for xhamster and redtube. Both are working.
Adult Scripts: Adult Script Pro - Adult Search Script
Adult Advertising/Traffic: Plug Rush - EXOClick - PopAds
Offline
I just tested the grabers on my box for xhamster and redtube. Both are working.
Hey
send me last version when u have time.
if i find anything that not working i can make it work...this way u will stop worry about less stuff and work more on dev v3
Offline
i copied your xHamster.php and got this message:
Tip!Invalid url! Supported sites: pornhub, redtube, empflix, tnaflix, porn2, pornative, xvideos, pornrabbit, keezmovies, madthumbs, yobt, sextube, slutload, tube8, pornerbros, manhub, deviantclip, xhamster, extremetube!
Offline
i copied your xHamster.php and got this message:
Tip!Invalid url! Supported sites: pornhub, redtube, empflix, tnaflix, porn2, pornative, xvideos, pornrabbit, keezmovies, madthumbs, yobt, sextube, slutload, tube8, pornerbros, manhub, deviantclip, xhamster, extremetube!
this is for grab videos ( source of mp4 ) to host videos not for embed videos.
thats error msg is from mass embed
Offline
PornHub fix
replace
private function get_file()
{
*
}
with
private function get_file()
{
preg_match('/"quality":"720","videoUrl":"(.*?)"},/', $this->html, $match);
if (isset($match['1']) && $match['1']) {
return utf8_trim(stripslashes($match['1']));
}
preg_match('/"quality":"480","videoUrl":"(.*?)"},/', $this->html, $match);
if (isset($match['1']) && $match['1']) {
return utf8_trim(stripslashes($match['1']));
}
preg_match('/"quality":"360","videoUrl":"(.*?)"},/', $this->html, $match);
if (isset($match['1']) && $match['1']) {
return utf8_trim(stripslashes($match['1']));
}
preg_match('/"quality":"240","videoUrl":"(.*?)"},/', $this->html, $match);
if (isset($match['1']) && $match['1']) {
return utf8_trim(stripslashes($match['1']));
}
return FALSE;
}
Offline
Pages: 1