public static function fromSimpleXml($xml, $userId = null)
  {
    $torrent = new NyaaTorrent();
    $torrent->title = (string)$xml->title;
    $torrent->setInfoFromDescription((string)$xml->description);
    $torrent->meta = NyaaMeta::createFromTitle($torrent->title);

    $torrent->torrentUrl = (string)$xml->link;
    $torrent->siteUrl = (string)$xml->guid;
    $torrent->category = (string)$xml->category;
    $torrent->publishDate = \DateTime::createFromFormat('D, d M Y H:i:s T', $xml->pubDate, new \DateTimeZone('UTC'));
    $torrent->userId = $userId;

    return $torrent;
  }