<commit_before>/**
 * Copyright (c) 2015 <NAME>
 *
 * This file is subject to the terms and conditions defined in
 * file 'LICENSE', which is part of this source code package.
 **/

#include "Lunarbaboon.h"

#include <QDebug>
#include <QRegularExpression>
#include <QRegularExpressionMatch>

Lunarbaboon::Lunarbaboon(QObject *parent) :
    Comic(parent)
{
    m_info.id             = QString("lunarbaboon");
    m_info.name           = QString("Lunarbaboon");
    m_info.color          = QColor(205, 207, 206);
    m_info.authors        = QStringList("<NAME>");
    m_info.homepage       = QUrl("http://www.lunarbaboon.com/");
    m_info.country        = QLocale::Canada;
    m_info.language       = QLocale::English;
    m_info.startDate      = QDate::fromString("2012-07-09", Qt::ISODate);
    m_info.endDate        = QDate::currentDate();
    m_info.stripSourceUrl = QUrl("http://www.lunarbaboon.com/");
}

QUrl Lunarbaboon::extractStripImageUrl(QByteArray data)
{
    QString html(data);
    QRegularExpression reg("<img[^>]*src=\"(/storage/[^\"]*)\"");
    QRegularExpressionMatch match = reg.match(html);

    if (!match.hasMatch()) {
        return QUrl();
    }

    QString src = match.captured(1);

    return QUrl("http://www.lunarbaboon.com/" + src);
}<commit_msg>fix Lunarbaboon comic<commit_after>/**
 * Copyright (c) 2015 <NAME>
 *
 * This file is subject to the terms and conditions defined in
 * file 'LICENSE', which is part of this source code package.
 **/

#include "Lunarbaboon.h"

#include <QDebug>
#include <QRegularExpression>
#include <QRegularExpressionMatch>

Lunarbaboon::Lunarbaboon(QObject *parent) :
    Comic(parent)
{
    m_info.id             = QString("lunarbaboon");
    m_info.name           = QString("Lunarbaboon");
    m_info.color          = QColor(205, 207, 206);
    m_info.authors        = QStringList("<NAME>");
    m_info.homepage       = QUrl("http://www.lunarbaboon.com/");
    m_info.country        = QLocale::Canada;
    m_info.language       = QLocale::English;
    m_info.startDate      = QDate::fromString("2012-07-09", Qt::ISODate);
    m_info.endDate        = QDate::currentDate();
    m_info.stripSourceUrl = QUrl("http://www.lunarbaboon.com/");
}

QUrl Lunarbaboon::extractStripImageUrl(QByteArray data)
{
    QString html(data);
    QRegularExpression reg("<img[^>]*src=\"(/storage/[^\"]*)\"");
    QRegularExpressionMatch match = reg.match(html);

    if (!match.hasMatch()) {
        return QUrl();
    }

    QString src = match.captured(1);

    return QUrl("http://www.lunarbaboon.com" + src);
}
{'fraction_non_alphanumeric': 0.1551387260648691, 'fraction_numerical': 0.017194216490816726, 'mean_word_length': 3.19672131147541, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 6, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2198006', 'n_tokens_mistral': 925, 'n_tokens_neox': 870, 'n_words': 162}