<commit_before>import * as $ from 'jquery';
import { clearStyles } from '../util';
import { Article } from 'index';

export const cleanup = () => {
    $('#scrollDiv').remove();
}

export function parse(): Article {
    return {
        title: $('.article_title').text() || undefined,
        content: (() => {
            const content = $('.article_body')[0].cloneNode(true);
            $('.ad, .footer_btnwrap, img[src^="http://img.etnews.com/2017/banner/"], *[src^="http://adv"]', content).remove();
            $('.daum_ddn_area, [id^=beacon]', content).remove();
            $('.a_ict_word', content).each(function (i, el) {
                $(el).replaceWith($('.ict_word', el).text());
            });
            return clearStyles(content).innerHTML;
        })(),
        timestamp: {
            created: new Date($('.date').text().replace('발행일 : ', '').replace(/\./g, '/')),
            lastModified: undefined<commit_msg>fix #320 전자신문 잘못된 작성일<commit_after>import * as $ from 'jquery';
import { clearStyles } from '../util';
import { Article } from 'index';

export const cleanup = () => {
    $('#scrollDiv').remove();
}

export function parse(): Article {
    return {
        title: $('.article_title').text() || undefined,
        content: (() => {
            const content = $('.article_body')[0].cloneNode(true);
            $('.ad, .footer_btnwrap, img[src^="http://img.etnews.com/2017/banner/"], *[src^="http://adv"]', content).remove();
            $('.daum_ddn_area, [id^=beacon]', content).remove();
            $('.a_ict_word', content).each(function (i, el) {
                $(el).replaceWith($('.ict_word', el).text());
            });
            return clearStyles(content).innerHTML;
        })(),
        timestamp: {
            created: new Date($('time').text().replace('발행일 : ', '').replace(/\./g, '/')),
            lastModified: undefined
{'fraction_non_alphanumeric': 0.22269579115610016, 'fraction_numerical': 0.006925945657964837, 'mean_word_length': 2.503731343283582, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, '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': '4005266', 'n_tokens_mistral': 574, 'n_tokens_neox': 583, 'n_words': 105}