<commit_before>_  = require 'underscore'
_.str = require 'underscore.string'
_.mixin _.str.exports()
_.str.include 'Underscore.string', 'string'
$ = require 'jquery'


class MylistAtom
  constructor : (@xml) ->
    @entry = []
    for entry in $(@xml).find('entry')
      @entry.push new MylistEntry(entry)

class MylistEntry
  constructor : (@body) ->
    b = $(@body)
    @title = b.find('title').text()
    @video_id = b.find('link').attr('href').split('/')[4]
    @timelike_id = new Number(b.find('id').text().split(',')[1].split(':')[1].split('/')[2])
    @published = b.find('published').text()
    @updated = b.find('updated').text()

    c = b.find('content')
    @thumbnail_url = c.find('img').attr('src')
    @description = c.find('.nico-description').text()
    @length = @.convert_to_sec(c.find('.nico-info-length').text())
    @info_date = @.convert_to_unix_time(c.find('.nico-info-date').text())

  convert_to_sec : (string) ->
    s = string.split(':')
    minute = new Number s[0]
    second = new Number s[1]
    minute * 60 + second

  convert_to_unix_time : (string) ->
    s = string.match(/\w+/g)
    new Date(s[0], s[1] - 1, s[2], s[3], s[4], s[5], 0) / 1000

module.exports = MylistAtom<commit_msg>Erased and modified unnecessary expressions.<commit_after>_  = require 'underscore'
_.str = require 'underscore.string'
_.mixin _.str.exports()
_.str.include 'Underscore.string', 'string'
$ = require 'jquery'


class MylistAtom
  constructor : (@xml) ->
    @entry = []
    for entry in $(@xml).find('entry')
      @entry.push new MylistEntry(entry)

class MylistEntry
  constructor : (@body) ->
    b = $(@body)
    @title = b.find('title').text()
    @video_id = b.find('link').attr('href').split('/')[4]
    @timelike_id = Number(b.find('id').text().split(',')[1].split(':')[1].split('/')[2])
    @published = b.find('published').text()
    @updated = b.find('updated').text()

    c = b.find('content')
    @thumbnail_url = c.find('img').attr('src')
    @description = c.find('.nico-description').text()
    @length = @.convert_to_sec c.find('.nico-info-length').text()
    @info_date = @.convert_to_unix_time c.find('.nico-info-date').text()

  convert_to_sec : (string) ->
    s = string.split(':')
    minute = Number s[0]
    second = Number s[1]
    minute * 60 + second

  convert_to_unix_time : (string) ->
    s = string.match(/\w+/g)
    new Date(s[0], s[1] - 1, s[2], s[3], s[4], s[5], 0) / 1000

module.exports = MylistAtom
{'fraction_non_alphanumeric': 0.2175681171207808, 'fraction_numerical': 0.016266775111834077, 'mean_word_length': 3.497257769652651, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 4}, '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': '7211387', 'n_tokens_mistral': 931, 'n_tokens_neox': 912, 'n_words': 168}