<commit_before>import { clearStyles } from '../util';

export default function () {
    let jews = {};
    var $ = function (b) { return document.querySelector(b); },
        a = [].slice.call($('.arvdate').childNodes).filter(function (v) { return v.nodeType === 3; })[0].textContent.trim();
    jews.title = $('.hbox>h2').textContent.trim();
    jews.subtitle = $('.hbox>h3').textContent.trim();
    jews.reporters = [{
        'name': $('.arvdate>a').textContent.replace('뉴데일리경제', '').trim(),
        'mail': a.match(/\b[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}\b/i)[0]
    }];
    jews.timestamp = {
        'created': new Date(a.match(/\d{4}\.\d{2}.\d{2}\s+\d{2}:\d{2}:\d{2}/)[0].replace(/\./g, '-').replace(/\s+/, 'T') + '+09:00'), // ISO 8601
        'lastModified': undefined
    };
    jews.content = clearStyles(document.getElementById('news_body_area')).innerHTML;
    return jews;
}<commit_msg>뉴데일리 경제 수리<commit_after>import $ from 'jquery';
import { clearStyles } from '../util';

export default function () {
    let jews = {};
    var headline = $('.hbox');
    var content = $('#news_body_area')[0].cloneNode(true);
    jews.title = $('h2', headline).text();
    jews.subtitle = (function(){
        var h3 = $('h3', headline).text();
        var p_toptitle = $('p.toptitle', headline).text();

        if (p_toptitle) {
            return h3 + '<br>' + p_toptitle;
        } else {
            return h3;
        }
    })();
    jews.reporters = [{
        'name': $('.cnt_view.news_body_area > div:eq(-2) ul a li').text(),
        'mail': undefined
    }];
    console.log($('.arvdate').text().split(/최종편집\s+/));
    jews.timestamp = {
        'created': undefined,
        'lastModified': new Date($('.arvdate').text().split(/최종편집\s+/)[1].replace(/\./g, '-').replace(/\s+/, 'T') + '+09:00') // ISO 8601
    };
    $('>div:last-child', content).remove();
    jews.content = clearStyles(content).innerHTML;
    return jews;
}
{'fraction_non_alphanumeric': 0.24613003095975233, 'fraction_numerical': 0.021671826625386997, 'mean_word_length': 2.7216890595009597, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, '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': '6062422', 'n_tokens_mistral': 733, 'n_tokens_neox': 739, 'n_words': 115}