<commit_before>package com.ru.waka

import twitter4j.{Query, Twitter}

import scala.collection.JavaConverters._
import scala.util.matching.Regex
import scalaz.\/

class KusokoraRepository(twitter: Twitter, private var urls: Seq[String] = Nil) {
  private val query = new Query("#papixクソコラグランプリ")
  private val urlPattern = new Regex("""(http|https)://(.*)\.([a-zA-Z0-9/]+)""", "url")

  def update(): Throwable \/ Unit = \/.fromTryCatchNonFatal({
    urls = twitter.search(query).getTweets.asScala.flatMap(tweet => {
      urlPattern.findAllIn(tweet.getText).matchData.map(_.toString())
    }).toSet.toSeq
  })

  def get: Seq[String] = Seq(urls:_*)
}<commit_msg>Fix urls<commit_after>package com.ru.waka

import twitter4j.{Query, Twitter}

import scala.collection.JavaConverters._
import scalaz.\/

class KusokoraRepository(twitter: Twitter, private var urls: Seq[String] = Nil) {
  private val query = new Query("#papixクソコラグランプリ")

  def update(): Throwable \/ Unit = \/.fromTryCatchNonFatal({
    urls = twitter.search(query).getTweets.asScala.flatMap(tweet => {
      tweet.getMediaEntities.map(_.getMediaURL)
    }).toSet.toSeq
  })

  def get: Seq[String] = Seq(urls:_*)
}

{'fraction_non_alphanumeric': 0.15776081424936386, 'fraction_numerical': 0.0033927056827820186, 'mean_word_length': 4.412844036697248, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '3865899', 'n_tokens_mistral': 450, 'n_tokens_neox': 438, 'n_words': 79}