Giter VIP home page Giter VIP logo

Comments (6)

zerodytrash avatar zerodytrash commented on May 23, 2024 1
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.

zerodytrash avatar zerodytrash commented on May 23, 2024

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.

ThanoFish avatar ThanoFish commented on May 23, 2024

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.

zerodytrash avatar zerodytrash commented on May 23, 2024

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.

ThanoFish avatar ThanoFish commented on May 23, 2024

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.

ThanoFish avatar ThanoFish commented on May 23, 2024
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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.