Open ghost opened 5 years ago
pornhub plugin works just fine for me, it's just not enabled by default. That's what I just found out 😬
Edit $config['plugins']
and add 'Pornhub' to your config.php file.
https://github.com/Athlon1600/php-proxy-app/blob/master/config.php
Sorry, I didn't notice that. It's working now. Thx!😀
Oops, I found that plugin only works on pc version. It shows blank on mobile or portal version, I don't know why. Could you take a look? Here is my site: https://vu.qnid.cc
Oh, I see. The portable and mobile version of Pornhub don't have #player tag.
So I add $playerm = vid_player($url, 400, 216); $content = Html::replace_inner('.playerWrapper', $playerm, $content);
I think I simply fixed it.
Oh, I see. The portable and mobile version of Pornhub don't have #player tag. So I add
$playerm = vid_player($url, 400, 216); $content = Html::replace_inner('.playerWrapper', $playerm, $content);
I think I simply fixed it.
It doesn't work for me, I will be appreciated if you can show your code.
Oh, I see. The portable and mobile version of Pornhub don't have #player tag. So I add
$playerm = vid_player($url, 400, 216); $content = Html::replace_inner('.playerWrapper', $playerm, $content);
I think I simply fixed it.It doesn't work for me, I will be appreciated if you can show your code.
'<?php
namespace Proxy\Plugin;
use Proxy\Plugin\AbstractPlugin; use Proxy\Event\ProxyEvent;
use Proxy\Html;
class PornhubPlugin extends AbstractPlugin {
protected $url_pattern = 'pornhub.com';
public function onCompleted(ProxyEvent $event){
$response = $event['response'];
$content = $response->getContent();
if(preg_match('/"videoUrl":"([^"]+)/', $content, $matches)){
$url = $matches[1];
$url = str_replace('\\', '', $url);
$player = vid_player($url, 989, 557);
$content = Html::replace_inner('#player', $player, $content);
$playerm = vid_player($url, 400, 216);
$content = Html::replace_inner('.playerWrapper', $playerm, $content);
}
// too many ads
$content = Html::remove_scripts($content);
$response->setContent($content);
}
}'
It worked for a long. However, at last few weeks. It displayed video is not available when I open Pornhub with this proxy. Could you help update the Pornhub plugin. Thx!