1

I'm trying to export the following list of my Instagram account on the desktop using Google Chrome but console.log is not working.

Once logged into my account, I hit Ctrl+Shift+I to bring up the dev console. I then used the Toggle Device Toolbar to change my layout to Galaxy S5. Clicked on the Following button and scrolled all the way down to load all users. Inside the console, I used the code below and it works fine showing an alert popup one after another for the number of users I'm following.

var igusers = document.getElementsByClassName("FPmhX notranslate _0imsa ");
for (var i = 0; i < igusers.length; i++) {
  var igusers_name = igusers[i].innerText;
  alert(igusers_name);
}

But I can't seem to use console.log(). I'm trying to have it display in a way that I can copy everything and paste it in an excel sheet.

Jay
  • 79
  • 9
  • Do you get any errors when you execute your `console.log()` statement? – zeterain Jun 27 '19 at 02:48
  • 1
    If you can't work out how to fix it, you could try adding all `igusers_name` variables to an array and then doing `prompt("Copy/paste from below:", igusers_name_array.join('\n'))`. This will let you copy paste the output all at once, one name per line. – Oliver Jun 27 '19 at 02:51
  • Also does this fix your problem? https://stackoverflow.com/a/19662083/4642943 – Oliver Jun 27 '19 at 02:55

1 Answers1

0

Maybe some debugging help u find out what's the problem.

Check if console.log() works fine somewhere else.

And inside the for loop , try console.log('Loop log testing')

Then make sure you did not ignore or black listed console.log() inside of tsconfig.

Syntax
  • 137
  • 1
  • 6