#download all emotes as pngs
1 messages · Page 1 of 1 (latest)
static
https://7tv.app/emotes/60ae8d9ff39a7552b658b60d -> https://cdn.7tv.app/emote/60ae8d9ff39a7552b658b60d/4x.png
animated
https://7tv.app/emotes/60ae958e229664e8667aea38 -> https://cdn.7tv.app/emote/60ae958e229664e8667aea38/4x_static.png
thanks! i think i could write a little python script to have it cycle thru the whole set
you can use this gql request on the v3 gql api to get all the emotes in a set
query GetEmoteSet($id: ObjectID!, $formats: [ImageFormat!]) {
emoteSet(id: $id) {
id
name
emotes {
name
data {
name
host {
url
files(formats: $formats) {
name
format
frame_count
}
}
}
}
}
}
it'll return you a list of all the emotes in a format like this
ty i'll give it a try!
i wrote this but i'm accessing a wrong endpoint for the api I believe
import fetch from 'node-fetch';
import fs from 'fs';
import path from 'path';
const query = `
query GetEmoteSet($id: ObjectID!, $formats: [ImageFormat!]) {
emoteSet(id: $id) {
id
name
emotes {
name
data {
name
host {
url
files(formats: $formats) {
name
format
frame_count
}
}
}
}
}
}
`;
async function fetchEmoteSet(emoteSetId) {
const response = await fetch('https://7tv.app/v3/gql', {
method: 'POST',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify({
query: query,
variables: { id: emoteSetId, formats: ['WEBP', 'PNG'] }
})
});
const text = await response.text(); // Read the response as text first
// Debugging: log the response to see what you received
console.log('Response Text:', text);
if (!response.ok) {
throw new Error(`HTTP error! status: ${response.status}`);
}
try {
const result = JSON.parse(text); // Parse the text as JSON
return result.data.emoteSet;
} catch (error) {
console.error('Failed to parse JSON:', error.message);
throw new Error('Invalid JSON response');
}
}
// other functions...
ahhh there it is, now it works thank you!
👍
do you believe there's a way of getting the animated ones as a gif or some other format?
yes
if its an animated emote
there's an automatically generated gif for it
under the same name but with .gif instead of .webp or .avif
so if you have this for example
you see the webp at the end
if you just change it to gif it'll be a gif
ohhh that's great
yeah
damn i wish i asked years ago
always had so many struggles with downloading emotes for reels and stuff
in the gql request i gave you, there's a framecount and if its bigger than 1 you can assume it's animated and add .gif at the end