# Problemen met het gebruik van het disqus.rb importscript

**URL:** <https://meta.discourse.org/t/issues-with-using-disqus-rb-import-script/169984>\
**Category:** Product Support\
**Created:** [12 november 2020 om 21:10 UTC](https://meta.discourse.org/t/issues-with-using-disqus-rb-import-script/169984 "2020-11-12T21:10:33Z")\
**Posts on this page:** 1\
**Showing post:** 7

<div class="post-metadata">

**Author:** ![astuffedtiger](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/astuffedtiger/32/258958_2.png) [@astuffedtiger](https://meta.discourse.org/u/astuffedtiger)\
**Post date:** [13 november 2020 om 17:10 UTC](https://meta.discourse.org/t/issues-with-using-disqus-rb-import-script/169984/7 "2020-11-13T17:10:19Z")

</div>

Alright! I’ve gotten this working by using the following:

```ruby
    @parser.posts.each do |id, p|
      p[:author_username] = "#{p[:author_name]}" unless p[:author_username]
      p[:author_email] = "#{p[:author_username]}@disqus.sucks" unless p[:author_email]
      next if p[:is_spam] == 'true' || p[:is_deleted] == 'true'
      puts "name: #{p[:author_name]}, username: #{p[:author_username]}, email: #{p[:author_email]}"
      by_email[p[:author_email]] = { name: p[:author_name], username: p[:author_username] }
    end

    @parser.threads.each do |id, t|
      t[:author_username] = "#{t[:author_name]}" unless t[:author_username]
      t[:author_email] = "#{t[:author_username]}@disqus.sucks" unless t[:author_email]
      by_email[t[:author_email]] = { name: t[:author_name], username: t[:author_username] }
    end

```

I also have `frozen_string_literal: false` set.

---

_[View the full topic](https://meta.discourse.org/t/issues-with-using-disqus-rb-import-script/169984)._
