New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Get profile picture of user who isn't streaming. #38
Comments
You could extract the profile picture URL from page source |
Thanks do i just have to replace "billieeilish" in "uniqueId=billieeilish" with the username of the person I want to get info on? |
Yes |
I've been trying to do both of these for a while now and both give no info. The "data" key in axios is literally undefined. |
const axios = require('axios');
axios.get('https://www.tiktok.com/api/user/detail/?aid=1988&app_language=en&app_name=tiktok_web&channel=tiktok_web&device_id=7108110397252322822&uniqueId=billieeilish', {
headers: {
'Connection': 'keep-alive',
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.5060.66 Safari/537.36 Edg/103.0.1264.44',
'Accept': 'application/json',
'Accept-Encoding': 'gzip, deflate',
'Accept-Language': 'en-US,en;q=0.9',
'Cookie': 'sessionid=1d9148c13154b2cf14ff7005021b7904' // enter your sessionid cookie value
}
}).then(response => {
console.log(response.data.userInfo.user.avatarLarger);
}).catch(err => {
console.error(err);
}) |
thank you, this worked perfectly. I forgot to add 2 of the headers |
I wanted to get the info of any user even if they are not streaming. I found that the getRoomInfo method works great for this, but I can't find the url for the profile picture.
The text was updated successfully, but these errors were encountered: