Resource icon

NextGen Парсер раздач v1.7.3

где именно надо указывать свой логин и пароль от руьрекера ? подскажите пдл.

у меня файл release.php при запуске ошибку выдает!
PHP:
/**
* Надстройки авторизации
*/
'auth' => array(
    // 'название трекера' => array('login' => 'ваш логин', 'pass' => 'ваш пароль'),
    'rutracker_ru' => array('login' => '', 'pass' => ''),
    'rutracker_org' => array('login' => '', 'pass' => ''),
    'booktracker' => array('login' => '', 'pass' => ''),
    'riperam' => array('login' => '', 'pass' => ''),
    'kinozal' => array('login' => '', 'pass' => ''),
    'ddgroupclub' => array('login' => '', 'pass' => ''),
    'megapeer' => array('login' => '', 'pass' => ''),
)
 
Всем привет ну делается да обновления парсера?
sticker.webp
 
Last edited:
Я все делал по мануалу.
к сожалению - не взлетает.
Взлетело с первого раза. И это при условии, что я трекерами кучу времени не занимался. Лет десять наверно. Но вот решил поставить для своих. Мало того, что сам движок встал чуть ли не мгновенно, так и моды тоже работают.
 
belomaxorka, если будешь добавлять nnmclub - может пригодится.

PHP:
function nnmclub($text, $curl = null, $tracker_data = null)
{
    // ------------------- Convert encoding -------------------
    $text = mb_convert_encoding($text, "UTF-8", "windows-1251");

    // ------------------- Get title -------------------
    preg_match("#<title>(.*?) :: NNM-Club</title>#s", $text, $matches);
    $title = isset($matches[1]) ? trim($matches[1]) : "";

    // ------------------- Get download link -------------------
    preg_match("#download\.php\?id=(\d+)#", $text, $matches);
    $torrent = isset($matches[1]) ? $matches[1] : "";

    // ------------------- Get content -------------------
    preg_match('#<div class="postbody"[^>]*>(.*?)</div>#s', $text, $matches);
    $content = isset($matches[1]) ? $matches[1] : "";

    // Декодируем HTML сущности
    $content = html_entity_decode($content, ENT_QUOTES | ENT_HTML401, "UTF-8");
    $content = str_replace("&nbsp;", " ", $content);
    $content = str_replace("&#58;", ":", $content);

    // Конвертация специфичных элементов nnmclub
    $content = preg_replace(
        '#<var class="postImg[^"]*" title="([^"]*)">[^<]*</var>#i',
        '[img]$1[/img]',
        $content,
    );
    $content = preg_replace(
        '#<a href="([^"]*)"[^>]*class="highslide"[^>]*><var class="postImg[^"]*" title="([^"]*)">[^<]*</var></a>#i',
        '[url=$1][img]$2[/img][/url]',
        $content,
    );
    $content = preg_replace("#<meta[^>]*/?>#i", "", $content);

    // Конвертация спойлеров
    $content = preg_replace(
        '#<div class="hide spoiler-wrap">.*?<div class="hide spoiler-body" title="([^"]*)"[^>]*>(.*?)</div>.*?</div>#is',
        '[spoiler="$1"]$2[/spoiler]',
        $content,
    );
    $content = preg_replace(
        '#<div class="spoiler-wrap"[^>]*onmousedown[^>]*>.*?</div>#is',
        "",
        $content,
    ); // Удаляем список файлов
    $content = preg_replace(
        '#<div class="spoiler-wrap"[^>]*>.*?<div class="spoiler-head">([^<]*)</div>.*?</div>#is',
        '$1',
        $content,
    );

    // Конвертация цитат
    $content = preg_replace(
        '#<table[^>]*class="qt"[^>]*>.*?<td[^>]*><span[^>]*><b>([^<]*) пишет\(а\):[^<]*</span></td>.*?<td class="quote"><div class="q">(.*?)</div></td>.*?</table>#is',
        '[quote="$1"]$2[/quote]',
        $content,
    );

    // Базовая конвертация
    $content = preg_replace("#<br\s*/?>#i", "\n", $content);
    $content = preg_replace("#<hr\s*/?>#i", "[hr]", $content);
    $content = preg_replace("#<script[^>]*>.*?</script>#is", "", $content);
    $content = preg_replace("#<style[^>]*>.*?</style>#is", "", $content);

    // Конвертация форматирования в цикле
    for ($i = 0; $i <= 20; $i++) {
        $content = preg_replace("#<b[^>]*>(.*?)</b>#is", '[b]$1[/b]', $content);
        $content = preg_replace(
            "#<strong[^>]*>(.*?)</strong>#is",
            '[b]$1[/b]',
            $content,
        );
        $content = preg_replace("#<i[^>]*>(.*?)</i>#is", '[i]$1[/i]', $content);
        $content = preg_replace(
            "#<em[^>]*>(.*?)</em>#is",
            '[i]$1[/i]',
            $content,
        );
        $content = preg_replace("#<u[^>]*>(.*?)</u>#is", '[u]$1[/u]', $content);
        $content = preg_replace("#<s[^>]*>(.*?)</s>#is", '[s]$1[/s]', $content);
        $content = preg_replace(
            "#<strike[^>]*>(.*?)</strike>#is",
            '[s]$1[/s]',
            $content,
        );
        $content = preg_replace(
            '#<span[^>]*style="[^"]*color:\s*([^;"]*)[^"]*"[^>]*>(.*?)</span>#is',
            '[color=$1]$2[/color]',
            $content,
        );
        $content = preg_replace(
            '#<span[^>]*style="[^"]*font-weight:\s*bold[^"]*"[^>]*>(.*?)</span>#is',
            '[b]$1[/b]',
            $content,
        );
        $content = preg_replace(
            '#<span[^>]*style="[^"]*font-style:\s*italic[^"]*"[^>]*>(.*?)</span>#is',
            '[i]$1[/i]',
            $content,
        );
        $content = preg_replace(
            '#<span[^>]*style="[^"]*font-size:\s*(\d+)px[^"]*"[^>]*>(.*?)</span>#is',
            '[size=$1]$2[/size]',
            $content,
        );
        $content = preg_replace(
            '#<span[^>]*style="[^"]*font-family:\s*([^;"]*)[^"]*"[^>]*>(.*?)</span>#is',
            '[font="$1"]$2[/font]',
            $content,
        );
        $content = preg_replace(
            '#<span[^>]*style="[^"]*text-align:\s*center[^"]*"[^>]*>(.*?)</span>#is',
            '[align=center]$1[/align]',
            $content,
        );
        $content = preg_replace(
            '#<font[^>]*color="([^"]*)"[^>]*>(.*?)</font>#is',
            '[color=$1]$2[/color]',
            $content,
        );
        $content = preg_replace(
            '#<font[^>]*size="([^"]*)"[^>]*>(.*?)</font>#is',
            '[size=$1]$2[/size]',
            $content,
        );
        $content = preg_replace(
            '#<font[^>]*style="font-size:\s*([^"]*?)pt"[^>]*>(.*?)</font>#is',
            '[size=$1]$2[/size]',
            $content,
        );
        $content = preg_replace(
            '#<a[^>]*href="([^"]*)"[^>]*>(.*?)</a>#is',
            '[url=$1]$2[/url]',
            $content,
        );
    }

    $content = preg_replace(
        '#<img[^>]*src="([^"]*)"[^>]*/?>#i',
        '[img]$1[/img]',
        $content,
    );
    $content = preg_replace(
        "#<center[^>]*>(.*?)</center>#is",
        '[align=center]$1[/align]',
        $content,
    );
    $content = preg_replace(
        "#<blockquote[^>]*>(.*?)</blockquote>#is",
        '[quote]$1[/quote]',
        $content,
    );
    $content = preg_replace(
        "#<ul[^>]*>(.*?)</ul>#is",
        '[list]$1[/list]',
        $content,
    );
    $content = preg_replace(
        "#<ol[^>]*>(.*?)</ol>#is",
        '[list=1]$1[/list]',
        $content,
    );
    $content = preg_replace("#<li[^>]*>(.*?)</li>#is", '[*]$1', $content);

    // Удаляем HTML теги
    $content = preg_replace(
        "#<noindex[^>]*>(.*?)</noindex>#is",
        '$1',
        $content,
    );
    $content = preg_replace(
        '#<div[^>]*class="clear"[^>]*></div>#i',
        "",
        $content,
    );
    $content = preg_replace("#<div[^>]*>(.*?)</div>#is", '$1', $content);
    $content = preg_replace("#<span[^>]*>(.*?)</span>#is", '$1', $content);
    $content = preg_replace("#<p[^>]*>(.*?)</p>#is", '$1' . "\n\n", $content);
    $content = preg_replace("#<table[^>]*>.*?</table>#is", "", $content);
    $content = preg_replace("#<[^>]+>#", "", $content);

    // Очистка битых BB-кодов
    $content = preg_replace("#\[url=[^\]]*\]\[/url\]#", "", $content);
    $content = preg_replace("#\[img\]\[/img\]#", "", $content);

    // Очистка
    $content = preg_replace('/\n{3,}/', "\n\n", $content);
    $content = preg_replace('/([\r\n])[\s]+/is', "\\1", $content);
    $content = trim($content);

    // Вставка плеера
    if (function_exists("insert_video_player")) {
        insert_video_player($content);
    }

    return [
        "title" => $title,
        "torrent" => $torrent,
        "content" => $content,
    ];
}
 
belomaxorka, если будешь добавлять nnmclub - может пригодится.

PHP:
function nnmclub($text, $curl = null, $tracker_data = null)
{
    // ------------------- Convert encoding -------------------
    $text = mb_convert_encoding($text, "UTF-8", "windows-1251");

    // ------------------- Get title -------------------
    preg_match("#<title>(.*?) :: NNM-Club</title>#s", $text, $matches);
    $title = isset($matches[1]) ? trim($matches[1]) : "";

    // ------------------- Get download link -------------------
    preg_match("#download\.php\?id=(\d+)#", $text, $matches);
    $torrent = isset($matches[1]) ? $matches[1] : "";

    // ------------------- Get content -------------------
    preg_match('#<div class="postbody"[^>]*>(.*?)</div>#s', $text, $matches);
    $content = isset($matches[1]) ? $matches[1] : "";

    // Декодируем HTML сущности
    $content = html_entity_decode($content, ENT_QUOTES | ENT_HTML401, "UTF-8");
    $content = str_replace("&nbsp;", " ", $content);
    $content = str_replace("&#58;", ":", $content);

    // Конвертация специфичных элементов nnmclub
    $content = preg_replace(
        '#<var class="postImg[^"]*" title="([^"]*)">[^<]*</var>#i',
        '[img]$1[/img]',
        $content,
    );
    $content = preg_replace(
        '#<a href="([^"]*)"[^>]*class="highslide"[^>]*><var class="postImg[^"]*" title="([^"]*)">[^<]*</var></a>#i',
        '[url=$1][img]$2[/img][/url]',
        $content,
    );
    $content = preg_replace("#<meta[^>]*/?>#i", "", $content);

    // Конвертация спойлеров
    $content = preg_replace(
        '#<div class="hide spoiler-wrap">.*?<div class="hide spoiler-body" title="([^"]*)"[^>]*>(.*?)</div>.*?</div>#is',
        '[spoiler="$1"]$2[/spoiler]',
        $content,
    );
    $content = preg_replace(
        '#<div class="spoiler-wrap"[^>]*onmousedown[^>]*>.*?</div>#is',
        "",
        $content,
    ); // Удаляем список файлов
    $content = preg_replace(
        '#<div class="spoiler-wrap"[^>]*>.*?<div class="spoiler-head">([^<]*)</div>.*?</div>#is',
        '$1',
        $content,
    );

    // Конвертация цитат
    $content = preg_replace(
        '#<table[^>]*class="qt"[^>]*>.*?<td[^>]*><span[^>]*><b>([^<]*) пишет\(а\):[^<]*</span></td>.*?<td class="quote"><div class="q">(.*?)</div></td>.*?</table>#is',
        '[quote="$1"]$2[/quote]',
        $content,
    );

    // Базовая конвертация
    $content = preg_replace("#<br\s*/?>#i", "\n", $content);
    $content = preg_replace("#<hr\s*/?>#i", "[hr]", $content);
    $content = preg_replace("#<script[^>]*>.*?</script>#is", "", $content);
    $content = preg_replace("#<style[^>]*>.*?</style>#is", "", $content);

    // Конвертация форматирования в цикле
    for ($i = 0; $i <= 20; $i++) {
        $content = preg_replace("#<b[^>]*>(.*?)</b>#is", '[b]$1[/b]', $content);
        $content = preg_replace(
            "#<strong[^>]*>(.*?)</strong>#is",
            '[b]$1[/b]',
            $content,
        );
        $content = preg_replace("#<i[^>]*>(.*?)</i>#is", '[i]$1[/i]', $content);
        $content = preg_replace(
            "#<em[^>]*>(.*?)</em>#is",
            '[i]$1[/i]',
            $content,
        );
        $content = preg_replace("#<u[^>]*>(.*?)</u>#is", '[u]$1[/u]', $content);
        $content = preg_replace("#<s[^>]*>(.*?)</s>#is", '[s]$1[/s]', $content);
        $content = preg_replace(
            "#<strike[^>]*>(.*?)</strike>#is",
            '[s]$1[/s]',
            $content,
        );
        $content = preg_replace(
            '#<span[^>]*style="[^"]*color:\s*([^;"]*)[^"]*"[^>]*>(.*?)</span>#is',
            '[color=$1]$2[/color]',
            $content,
        );
        $content = preg_replace(
            '#<span[^>]*style="[^"]*font-weight:\s*bold[^"]*"[^>]*>(.*?)</span>#is',
            '[b]$1[/b]',
            $content,
        );
        $content = preg_replace(
            '#<span[^>]*style="[^"]*font-style:\s*italic[^"]*"[^>]*>(.*?)</span>#is',
            '[i]$1[/i]',
            $content,
        );
        $content = preg_replace(
            '#<span[^>]*style="[^"]*font-size:\s*(\d+)px[^"]*"[^>]*>(.*?)</span>#is',
            '[size=$1]$2[/size]',
            $content,
        );
        $content = preg_replace(
            '#<span[^>]*style="[^"]*font-family:\s*([^;"]*)[^"]*"[^>]*>(.*?)</span>#is',
            '[font="$1"]$2[/font]',
            $content,
        );
        $content = preg_replace(
            '#<span[^>]*style="[^"]*text-align:\s*center[^"]*"[^>]*>(.*?)</span>#is',
            '[align=center]$1[/align]',
            $content,
        );
        $content = preg_replace(
            '#<font[^>]*color="([^"]*)"[^>]*>(.*?)</font>#is',
            '[color=$1]$2[/color]',
            $content,
        );
        $content = preg_replace(
            '#<font[^>]*size="([^"]*)"[^>]*>(.*?)</font>#is',
            '[size=$1]$2[/size]',
            $content,
        );
        $content = preg_replace(
            '#<font[^>]*style="font-size:\s*([^"]*?)pt"[^>]*>(.*?)</font>#is',
            '[size=$1]$2[/size]',
            $content,
        );
        $content = preg_replace(
            '#<a[^>]*href="([^"]*)"[^>]*>(.*?)</a>#is',
            '[url=$1]$2[/url]',
            $content,
        );
    }

    $content = preg_replace(
        '#<img[^>]*src="([^"]*)"[^>]*/?>#i',
        '[img]$1[/img]',
        $content,
    );
    $content = preg_replace(
        "#<center[^>]*>(.*?)</center>#is",
        '[align=center]$1[/align]',
        $content,
    );
    $content = preg_replace(
        "#<blockquote[^>]*>(.*?)</blockquote>#is",
        '[quote]$1[/quote]',
        $content,
    );
    $content = preg_replace(
        "#<ul[^>]*>(.*?)</ul>#is",
        '[list]$1[/list]',
        $content,
    );
    $content = preg_replace(
        "#<ol[^>]*>(.*?)</ol>#is",
        '[list=1]$1[/list]',
        $content,
    );
    $content = preg_replace("#<li[^>]*>(.*?)</li>#is", '[*]$1', $content);

    // Удаляем HTML теги
    $content = preg_replace(
        "#<noindex[^>]*>(.*?)</noindex>#is",
        '$1',
        $content,
    );
    $content = preg_replace(
        '#<div[^>]*class="clear"[^>]*></div>#i',
        "",
        $content,
    );
    $content = preg_replace("#<div[^>]*>(.*?)</div>#is", '$1', $content);
    $content = preg_replace("#<span[^>]*>(.*?)</span>#is", '$1', $content);
    $content = preg_replace("#<p[^>]*>(.*?)</p>#is", '$1' . "\n\n", $content);
    $content = preg_replace("#<table[^>]*>.*?</table>#is", "", $content);
    $content = preg_replace("#<[^>]+>#", "", $content);

    // Очистка битых BB-кодов
    $content = preg_replace("#\[url=[^\]]*\]\[/url\]#", "", $content);
    $content = preg_replace("#\[img\]\[/img\]#", "", $content);

    // Очистка
    $content = preg_replace('/\n{3,}/', "\n\n", $content);
    $content = preg_replace('/([\r\n])[\s]+/is', "\\1", $content);
    $content = trim($content);

    // Вставка плеера
    if (function_exists("insert_video_player")) {
        insert_video_player($content);
    }

    return [
        "title" => $title,
        "torrent" => $torrent,
        "content" => $content,
    ];
}
PHP:
'nnmclub' => array(
        'enabled' => true,
        'info' => array(
            'name' => 'nnmclub.to',
            'href' => 'https://nnmclub.to',
            'icon' => BB_ROOT . 'styles/images/trackers/nnmclub.ico',
        ),
        'settings' => array(
            'regex' => "#nnmclub\.to/forum\/viewtopic\.php\?t=\d+#",
            'dl_url' => 'https://nnmclub.to/forum/download.php?id=',
            'target_element' => '<div style="padding-top: 6px;">',
        ),
        'auth' => array(
            'enabled' => true,
            'login_url' => 'https://nnmclub.to/forum/login.php',
            'login_input_name' => 'username',
            'password_input_name' => 'password',
            'login_has_error_element' => '',
        ),
    ),
сделал но всё ровно не работает показывает ( Не удается получить данные с страницы )
 
я тоже пробовал, но получил тоже самое (Не удается получить данные с страницы):)
 
Back
Top