Discuss Scratch

--Explosion--
Scratcher
1000+ posts

How do I get my followers list?

How can I get my followers list as a copy/pasteable list of only usernames?
I know that you can use the scratch api to get a list of a users followers like this
https://api.scratch.mit.edu/users/--explosion--/followers?offset=0
Where offset is the offset by a certain number of followers (the list goes most to last recent) amd each page has 20 followers on it. If anybody code please make either make a progeam that I can run in console or make something and paste my followers list here than that would be extremely helpfull! Thanks!
–Explosion–

Last edited by --Explosion-- (Oct. 29, 2019 01:54:22)

Sheep_maker
Scratcher
1000+ posts

How do I get my followers list?

await (async () => {
  const followers = []
  let offset = 0
  let json
  do {
    json = await fetch(`https://api.scratch.mit.edu/users/--explosion--/followers?offset=${offset}&limit=40`)
      .then(r => r.json())
    offset += 40
    followers.push(...json)
  } while (json.length === 40)
  return followers.map(follower => follower.username)
})()
returns an array of the usernames of your followers; you can run this in the console on the Scratch website. At least on Chrome you can right click the array that appears > Store as global variable, which stores the array in a variable (usually `temp1`). You can then do something like `temp1.join('\n')` to make it a string of the usernames separated by newlines
--Explosion--
Scratcher
1000+ posts

How do I get my followers list?

Sheep_maker wrote:

await (async () => {
  const followers = []
  let offset = 0
  let json
  do {
    json = await fetch(`https://api.scratch.mit.edu/users/--explosion--/followers?offset=${offset}&limit=40`)
      .then(r => r.json())
    offset += 40
    followers.push(...json)
  } while (json.length === 40)
  return followers.map(follower => follower.username)
})()
returns an array of the usernames of your followers; you can run this in the console on the Scratch website. At least on Chrome you can right click the array that appears > Store as global variable, which stores the array in a variable (usually `temp1`). You can then do something like `temp1.join('\n')` to make it a string of the usernames separated by newlines
Hm… it says:
ReferenceError: Can't find variable: await
Global Code
evaluateWithScopeExtension
(anonymous function)
_wrapCall
--Explosion--
Scratcher
1000+ posts

How do I get my followers list?

Sheep_maker wrote:

await (async () => {
  const followers = []
  let offset = 0
  let json
  do {
    json = await fetch(`https://api.scratch.mit.edu/users/--explosion--/followers?offset=${offset}&limit=40`)
      .then(r => r.json())
    offset += 40
    followers.push(...json)
  } while (json.length === 40)
  return followers.map(follower => follower.username)
})()
returns an array of the usernames of your followers; you can run this in the console on the Scratch website. At least on Chrome you can right click the array that appears > Store as global variable, which stores the array in a variable (usually `temp1`). You can then do something like `temp1.join('\n')` to make it a string of the usernames separated by newlines
I'm sorry, I can't get this to run, I noticed the syntax error and tried again, would you mind running it and then posting the followers list here? Thanks!
CatsUnited
Scratcher
1000+ posts

How do I get my followers list?

--Explosion-- wrote:

I'm sorry, I can't get this to run, I noticed the syntax error and tried again, would you mind running it and then posting the followers list here? Thanks!
I managed to get the script to work when I ran it on Chrome's console log. I suggest trying it again with Chrome on your own machine, since it's not easy for me to be able to copy your follower list from the Chrome console due to the size of it, but here's the latest (100?) followers you have:
(1518) ["mnsj2", "scratch_Internet", "DUCKS789", "ScaIes", "hackettstudent3", "123hiforthereals12", "Imaginationstudio", "-Ashlyn-", "alexnewtronds", "jessiezhou2011", "the_cool_guyz", "Alchemaster", "-PixelParty-", "minecraftvsmoney", "sans_fan_clan_man", "DRB069", "TacticalEquator", "klasky1", "guiguipripri", "Nambaseking01", "marshmallow_funfood", "Audrey_Is_The_Queen", "vilizerio", "cs1866244", "Laffayeet", "Lazy_otter2_0", "jgao3626", "AreYouAlbert", "patchess554", "MiniMe2point0", "Elizdancer97", "dreamc19-s16", "Cooldude490", "SilverSpartan76", "Airlinefive", "avagsss", "dboderfield", "Dovestar8", "scoutnova", "752396", "WillyScratchMaker", "ThatOneWeirdDude", "SillyEar7", "ScratchTheCatNine4s", "A_nicePotato", "ArtDJ1", "Random_Human_Bean", "SuperCanon20", "Nat4537", "mickeymouse1929", "Dexo224", "Speedplay99", "_0xBadc0de", "Castillo512", "blackhamster125", "-most-", "Oscarjel1", "jesse8yunji", "wankexingyuan", "SCRACO65", "MD15G", "LB5G", "DarsithdLPS1920", "Jarvis3000", "thepixelist", "pizzaooh11", "BlueTheFlamesilk1", "Vividvibes_100", "CodePiramid", "404wt3094", "HermioneJGranger103", "SpottedleafIsAwsome", "explodingkittencat", "sozzles09", "phughes5", "y_naicker", "kc021", "Smile8900", "MarioMaker8008", "KIRAXLEEB", "poker10", "education-666", "Exploding_Test", "AwesomeBattleDroid", "cs3600056", "Alphapax", "derpydoop123", "xxlimited_dom", "tulatula", "Game_corner", "PinksMonkey", "EVB379968", "lengthhead1", "fantasticcatguy", "_DogePlayer_", "RedRebellion77", "JefferyTheSuperKat", "KiwigamerHD", "Rocketman14", "iornfists", …]
Sheep_maker
Scratcher
1000+ posts

How do I get my followers list?

--Explosion-- wrote:

I'm sorry, I can't get this to run, I noticed the syntax error and tried again, would you mind running it and then posting the followers list here? Thanks!
At least on modern versions of Chrome, await is allowed by default without wrapping it in an async function; here's one for consoles that don't do that:
(async () => {
  const followers = []
  let offset = 0
  let json
  do {
    json = await fetch(`https://api.scratch.mit.edu/users/--explosion--/followers?offset=${offset}&limit=40`)
      .then(r => r.json())
    offset += 40
    followers.push(...json)
  } while (json.length === 40)
  return followers.map(follower => follower.username)
})()
  .then(usernames => {
    console.log(usernames)
  })
This just logs the usernames; you can do whatever you want with the usernames array in the usernames => { … } function
--Explosion--
Scratcher
1000+ posts

How do I get my followers list?

CatsUnited wrote:

--Explosion-- wrote:

I'm sorry, I can't get this to run, I noticed the syntax error and tried again, would you mind running it and then posting the followers list here? Thanks!
I managed to get the script to work when I ran it on Chrome's console log. I suggest trying it again with Chrome on your own machine, since it's not easy for me to be able to copy your follower list from the Chrome console due to the size of it, but here's the latest (100?) followers you have:
(1518) ["mnsj2", "scratch_Internet", "DUCKS789", "ScaIes", "hackettstudent3", "123hiforthereals12", "Imaginationstudio", "-Ashlyn-", "alexnewtronds", "jessiezhou2011", "the_cool_guyz", "Alchemaster", "-PixelParty-", "minecraftvsmoney", "sans_fan_clan_man", "DRB069", "TacticalEquator", "klasky1", "guiguipripri", "Nambaseking01", "marshmallow_funfood", "Audrey_Is_The_Queen", "vilizerio", "cs1866244", "Laffayeet", "Lazy_otter2_0", "jgao3626", "AreYouAlbert", "patchess554", "MiniMe2point0", "Elizdancer97", "dreamc19-s16", "Cooldude490", "SilverSpartan76", "Airlinefive", "avagsss", "dboderfield", "Dovestar8", "scoutnova", "752396", "WillyScratchMaker", "ThatOneWeirdDude", "SillyEar7", "ScratchTheCatNine4s", "A_nicePotato", "ArtDJ1", "Random_Human_Bean", "SuperCanon20", "Nat4537", "mickeymouse1929", "Dexo224", "Speedplay99", "_0xBadc0de", "Castillo512", "blackhamster125", "-most-", "Oscarjel1", "jesse8yunji", "wankexingyuan", "SCRACO65", "MD15G", "LB5G", "DarsithdLPS1920", "Jarvis3000", "thepixelist", "pizzaooh11", "BlueTheFlamesilk1", "Vividvibes_100", "CodePiramid", "404wt3094", "HermioneJGranger103", "SpottedleafIsAwsome", "explodingkittencat", "sozzles09", "phughes5", "y_naicker", "kc021", "Smile8900", "MarioMaker8008", "KIRAXLEEB", "poker10", "education-666", "Exploding_Test", "AwesomeBattleDroid", "cs3600056", "Alphapax", "derpydoop123", "xxlimited_dom", "tulatula", "Game_corner", "PinksMonkey", "EVB379968", "lengthhead1", "fantasticcatguy", "_DogePlayer_", "RedRebellion77", "JefferyTheSuperKat", "KiwigamerHD", "Rocketman14", "iornfists", …]
Thanks! I realized that the script must not be working because I was using safari, thanks for your help!
--Explosion--
Scratcher
1000+ posts

How do I get my followers list?

Sheep_maker wrote:

--Explosion-- wrote:

I'm sorry, I can't get this to run, I noticed the syntax error and tried again, would you mind running it and then posting the followers list here? Thanks!
At least on modern versions of Chrome, await is allowed by default without wrapping it in an async function; here's one for consoles that don't do that:
(async () => {
  const followers = []
  let offset = 0
  let json
  do {
    json = await fetch(`https://api.scratch.mit.edu/users/--explosion--/followers?offset=${offset}&limit=40`)
      .then(r => r.json())
    offset += 40
    followers.push(...json)
  } while (json.length === 40)
  return followers.map(follower => follower.username)
})()
  .then(usernames => {
    console.log(usernames)
  })
This just logs the usernames; you can do whatever you want with the usernames array in the usernames => { … } function
Thank you! I'm on mobile right now, but as soon as I get back on my pc I'll try it. Also, I am using safari, so that must have been the problem
--Explosion--
Scratcher
1000+ posts

How do I get my followers list?

Sheep_maker wrote:

--Explosion-- wrote:

I'm sorry, I can't get this to run, I noticed the syntax error and tried again, would you mind running it and then posting the followers list here? Thanks!
At least on modern versions of Chrome, await is allowed by default without wrapping it in an async function; here's one for consoles that don't do that:
(async () => {
  const followers = []
  let offset = 0
  let json
  do {
    json = await fetch(`https://api.scratch.mit.edu/users/--explosion--/followers?offset=${offset}&limit=40`)
      .then(r => r.json())
    offset += 40
    followers.push(...json)
  } while (json.length === 40)
  return followers.map(follower => follower.username)
})()
  .then(usernames => {
    console.log(usernames)
  })
This just logs the usernames; you can do whatever you want with the usernames array in the usernames => { … } function
So I ran it and it worked, but it only gave me the first 99 followers, can I expand that list/export the full thing?
Sheep_maker
Scratcher
1000+ posts

How do I get my followers list?

--Explosion-- wrote:

Sheep_maker wrote:

So I ran it and it worked, but it only gave me the first 99 followers, can I expand that list/export the full thing?
Perhaps Safari is truncating the array?

You can make it log a string instead; you can replace usernames in this line:
    console.log(usernames)
with either usernames.join('\n'), which make it a string with each username in its own line, or usernames.join(' '), which puts all the usernames in a single line separated by spaces. Then you should be able to copy the whole thing and paste it somewhere
--Explosion--
Scratcher
1000+ posts

How do I get my followers list?

Sheep_maker wrote:

--Explosion-- wrote:

Sheep_maker wrote:

So I ran it and it worked, but it only gave me the first 99 followers, can I expand that list/export the full thing?
Perhaps Safari is truncating the array?

You can make it log a string instead; you can replace usernames in this line:
    console.log(usernames)
with either usernames.join('\n'), which make it a string with each username in its own line, or usernames.join(' '), which puts all the usernames in a single line separated by spaces. Then you should be able to copy the whole thing and paste it somewhere
Thanks so much!
DipLeChip
Scratcher
1000+ posts

How do I get my followers list?

--Explosion-- wrote:

Sheep_maker wrote:

--Explosion-- wrote:

I'm sorry, I can't get this to run, I noticed the syntax error and tried again, would you mind running it and then posting the followers list here? Thanks!
At least on modern versions of Chrome, await is allowed by default without wrapping it in an async function; here's one for consoles that don't do that:
(async () => {
  const followers = []
  let offset = 0
  let json
  do {
    json = await fetch(`https://api.scratch.mit.edu/users/--explosion--/followers?offset=${offset}&limit=40`)
      .then(r => r.json())
    offset += 40
    followers.push(...json)
  } while (json.length === 40)
  return followers.map(follower => follower.username)
})()
  .then(usernames => {
    console.log(usernames)
  })
This just logs the usernames; you can do whatever you want with the usernames array in the usernames => { … } function
So I ran it and it worked, but it only gave me the first 99 followers, can I expand that list/export the full thing?
with le code I was able to get htis:

(removed by moderator - please don't share links to google docs)(just watch the scroll bar select thigny grow smaller and smaller

Last edited by Paddle2See (Oct. 30, 2019 13:38:40)

Nambaseking01
Scratcher
1000+ posts

How do I get my followers list?

Sheep_maker wrote:

await (async () => {
  const followers = []
  let offset = 0
  let json
  do {
    json = await fetch(`https://api.scratch.mit.edu/users/--explosion--/followers?offset=${offset}&limit=40`)
      .then(r => r.json())
    offset += 40
    followers.push(...json)
  } while (json.length === 40)
  return followers.map(follower => follower.username)
})()
returns an array of the usernames of your followers; you can run this in the console on the Scratch website. At least on Chrome you can right click the array that appears > Store as global variable, which stores the array in a variable (usually `temp1`). You can then do something like `temp1.join('\n')` to make it a string of the usernames separated by newlines

Thank you for that, I can now use it for my stuff by changing the username! MUAHAHAHHA-
DipLeChip
Scratcher
1000+ posts

How do I get my followers list?

OwenRich wrote:

(removed by moderator - please don't share links to google docs)
OOOOOF.

it's like 100k names of all griffpatch follower where to share.
Nambaseking01
Scratcher
1000+ posts

How do I get my followers list?

OwenRich wrote:

-snip-
OOOOOF.

it's like 100k names of all griffpatch follower where to share.

You could use GitHub .md files, they are not banned.
--Explosion--
Scratcher
1000+ posts

How do I get my followers list?

Yay! It worked perfectly! But… For some reason it says I have 1769 followers even though I only have 1730
HatGirlOfficial
Scratcher
43 posts

How do I get my followers list?

Is there a way to list Studio members too?
Jeffalo
Scratcher
1000+ posts

How do I get my followers list?

--Explosion-- wrote:

Yay! It worked perfectly! But… For some reason it says I have 1769 followers even though I only have 1730
>only
>1730
Philipuss
Scratcher
59 posts

How do I get my followers list?

Sheep_maker wrote:

await (async () => {
  const followers = []
  let offset = 0
  let json
  do {
    json = await fetch(`https://api.scratch.mit.edu/users/--explosion--/followers?offset=${offset}&limit=40`)
      .then(r => r.json())
    offset += 40
    followers.push(...json)
  } while (json.length === 40)
  return followers.map(follower => follower.username)
})()
returns an array of the usernames of your followers; you can run this in the console on the Scratch website. At least on Chrome you can right click the array that appears > Store as global variable, which stores the array in a variable (usually `temp1`). You can then do something like `temp1.join('\n')` to make it a string of the usernames separated by newlines
Hi there! It seems that it can only give 40 followers and changing the limit just gives an error. Any idea on how I can get a list of 200 000 followers?
RB4905
Scratcher
35 posts

How do I get my followers list?

if anybody needs further help here is a tutorilal on how to
https://scratch.mit.edu/projects/466105242/

Powered by DjangoBB