Comments (6)
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);
})
from tiktok-live-connector.
You could extract the profile picture URL from page source https://www.tiktok.com/@username
Or use the API, which only works if you submit a valid session cookie: https://www.tiktok.com/api/user/detail/?aid=1988&app_language=en&app_name=tiktok_web&channel=tiktok_web&device_id=7108110397252322822&uniqueId=billieeilish
from tiktok-live-connector.
use the API, which only works if you submit a valid session cookie: https://www.tiktok.com/api/user/detail/?aid=1988&app_language=en&app_name=tiktok_web&channel=tiktok_web&device_id=7108110397252322822&uniqueId=billieeilish
Thanks
do i just have to replace "billieeilish" in "uniqueId=billieeilish" with the username of the person I want to get info on?
from tiktok-live-connector.
do i just have to replace "billieeilish" in "uniqueId=billieeilish" with the username of the person I want to get info on?
Yes
from tiktok-live-connector.
You could extract the profile picture URL from page source
https://www.tiktok.com/@username
Or use the API, which only works if you submit a valid session cookie: https://www.tiktok.com/api/user/detail/?aid=1988&app_language=en&app_name=tiktok_web&channel=tiktok_web&device_id=7108110397252322822&uniqueId=billieeilish
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.
from tiktok-live-connector.
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
from tiktok-live-connector.
Related Issues (20)
- Can you provide a custom authentication server interface?
- Please
- Live
- does it consider live restarts?
- Some comments don't register HOT 3
- Agent unavailable
- download with nodejs?
- Error: Failed to sign request: timeout of 5000ms exceeded; HOT 1
- Error when trying tiktok-live-connector in my Next.js project HOT 1
- User Leaves A Stream
- the treasure box in tiktok live
- [BUG] 'sendMessage' not working properly HOT 4
- Setting the proxy but it is not using it
- #TikTok HOT 1
- The library won't work for private accounts
- suddenly connects, even though the user is offline (sometimes)
- Error: Failed to retrieve room_id from page source. Your IP or country might be blocked by TikTok. HOT 2
- How to record livestream mp4 HOT 2
- Messages dont appearing
- How can I create site Generate Signature [Request was unsuccessful]
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tiktok-live-connector.