Skip to content

Instantly share code, notes, and snippets.

@davidteather
Created May 7, 2020 19:49
Show Gist options
  • Save davidteather/7c30780bbc30772ba11ec9e0b909e99d to your computer and use it in GitHub Desktop.
Save davidteather/7c30780bbc30772ba11ec9e0b909e99d to your computer and use it in GitHub Desktop.
This is an example of a TikTok dictionary returned by davidteather/TikTok-Api
{
'id': '6818316025491246342',
'desc': 'My 2015 moves still play in 2020�😂 #quarantinelife #throwback',
'createTime': 1587512910,
'video': {
'height': 626,
'width': 470,
'duration': 11,
'ratio': '480p
'cover': 'https://p16.muscdn.com/obj/tos-maliva-p-0068/5951967888f341628c687b582f1970ac_1587512912',
'originCover': 'https://p16.muscdn.com/obj/tos-maliva-p-0068/bb62166cb2cd439280b2442610e6e132_1587512911',
'dynamicCover': 'https://p16.muscdn.com/obj/tos-maliva-p-0068/8e1c21cd695f408792967c8e80aa24af_1587512912',
'playAddr': 'https://v19.muscdn.com/8576a746718739ea54cdc70f4ecea640/5eb4ba8d/video/tos/useast2a/tos-useast2a-ve-0068c003/1a30febe68774731ab8fef60dc256e0d/?a=1233&br=1592&bt=796&cr=0&cs=0&dr=0&ds=2&er=&l=202005071948500101890370222F7959A4&lr=tiktok_m&qs=0&rc=anJlcXc1OmtydDMzNjczM0ApaDk6aGVpOmU0Nzg2OjQ5aWdhNHBmLjFzYGNfLS0vMTZzczQvMjRgNjMvLV5eMS8vNjE6Yw%3D%3D&vl=&vr=',
'downloadAddr': 'https://v19.muscdn.com/8576a746718739ea54cdc70f4ecea640/5eb4ba8d/video/tos/useast2a/tos-useast2a-ve-0068c003/1a30febe68774731ab8fef60dc256e0d/?a=1233&br=1592&bt=796&cr=0&cs=0&dr=0&ds=2&er=&l=202005071948500101890370222F7959A4&lr=tiktok_m&qs=0&rc=anJlcXc1OmtydDMzNjczM0ApaDk6aGVpOmU0Nzg2OjQ5aWdhNHBmLjFzYGNfLS0vMTZzczQvMjRgNjMvLV5eMS8vNjE6Yw%3D%3D&vl=&vr='
},
'author': {
'id': '6745191554350760966',
'uniqueId': 'therock',
'nickname': 'The Rock',
'avatarThumb': 'https://p16-va-default.akamaized.net/img/musically-maliva-obj/1647596478025734~c5_100x100.jpeg',
'avatarMedium': 'https://p16-va-default.akamaized.net/img/musically-maliva-obj/1647596478025734~c5_720x720.jpeg',
'avatarLarger': 'https://p16-va-default.akamaized.net/img/musically-maliva-obj/1647596478025734~c5_1080x1080.jpeg',
'signature': 'mana. gratitude. tequila.',
'verified': True,
'secUid': 'MS4wLjABAAAAM3R2BtjzVT-uAtstkl2iugMzC6AtnpkojJbjiOdDDrdsTiTR75-8lyWJCY5VvDrZ',
'relation': 0
},
'music': {
'id': '6800996740322297858',
'title': 'Savage',
'playUrl': 'https://sf16-sg.muscdn.com/obj/tiktok-obj/34615d801bb9a5feafe2005896c083a2.m4a',
'coverThumb': 'https://p16-sg.muscdn.com/aweme/100x100/tos-alisg-i-0000/7430b40854434b41acc0088c0b6d2e2e.jpeg',
'coverMedium': 'https://p16-sg.muscdn.com/aweme/200x200/tos-alisg-i-0000/7430b40854434b41acc0088c0b6d2e2e.jpeg',
'coverLarge': 'https://p16-sg.muscdn.com/aweme/720x720/tos-alisg-i-0000/7430b40854434b41acc0088c0b6d2e2e.jpeg',
'authorName': 'Megan Thee Stallion',
'original': False
},
'challenges': [{
'id': '1659671544096774',
'title': 'quarantinelife',
'desc': ''
}, {
'id': '6047',
'title': 'throwback',
'desc': '',
'profileThumb': 'https://p16-va-default.akamaized.net/obj/musically-maliva-obj/c0bb51a8f2f92179c7cc096ab720af3e',
'profileMedium': 'https://p16-va-default.akamaized.net/obj/musically-maliva-obj/c0bb51a8f2f92179c7cc096ab720af3e',
'profileLarger': 'https://p16-va-default.akamaized.net/obj/musically-maliva-obj/c0bb51a8f2f92179c7cc096ab720af3e'
}],
'stats': {
'diggCount': 3773532,
'shareCount': 33456,
'commentCount': 20166,
'playCount': 37825357
},
'originalItem': False,
'officalItem': False,
'textExtra': [{
'awemeId': '',
'start': 35,
'end': 50,
'hashtagName': 'quarantinelife',
'hashtagId': '',
'type': 1,
'userId': '',
'isCommerce': False
}, {
'awemeId': '',
'start': 51,
'end': 61,
'hashtagName': 'throwback',
'hashtagId': '',
'type': 1,
'userId': '',
'isCommerce': False
}],
'secret': False,
'forFriend': False,
'digged': False,
'itemCommentStatus': 0,
'showNotPass': False,
'vl1': False
}
@TobyKillen
Copy link

How do you use the def functions in python? I might be missing something here. Calling them dosent do anything. Thanks

@swimmwatch
Copy link

swimmwatch commented May 4, 2021

Hi! What is secUid? Where i can get it?

@Starguy-18
Copy link

Is it possible to also get comment information? I know that's a lot of data, but there might be a way to compress the comments

@FunDan3
Copy link

FunDan3 commented Dec 10, 2021

I want to get likes of video. where to get it?

@davidteather
Copy link
Author

@FunDan3 should be stats->diggCount

@FunDan3
Copy link

FunDan3 commented Dec 12, 2021

@davidteather Thanks. Its not obvious so I asked. Thx for help =)

@momofujimomo
Copy link

Is it possible to get something like 'reachCount' (# of people who watched the video - i.e. unique users)? I can see there is 'playCount', but that includes replays, right? Thanks!

@0xb511
Copy link

0xb511 commented Jul 30, 2023

commands?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment