I was checking the Disqus threads for my site in the Disqus web page and I noticed that there was something wrong. Some threads had the wrong url, pointing to
http://localhost:4000 and some had the wrong title (instead of the title the url was showing). I came to the conclusion that this was due to the fact that I’ve been using disqus_developer=1 to test locally after migrating to Disqus and the threads that I visited for the first time locally got the local url (localhost) and the because disqus couldn’t get the title from that url (since it was a local url) it assigned a title based on the (local) url.
So I decided to fix it using the Disqus API and I wrote the following script