Skip to content
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

Please add the possibility to get the profile pictures as png or jpeg #54

Closed
brogrammer1337 opened this issue Aug 11, 2022 · 2 comments
Closed
Labels
enhancement New feature or request

Comments

@brogrammer1337
Copy link

I get the images only as .webp
Would it be possible to get the link as png or jpeg? On the site https://ttsave.app/ for example you get the profile pictures also as .jpeg
That would be great!

@zerodytrash zerodytrash added the enhancement New feature or request label Aug 16, 2022
@brogrammer1337
Copy link
Author

Addendum: In the TikTokLiveSharp package you get back a string array with 4 URLs per user. One url leads to the profile picture as JPEG. Would be great if it could be implemented that way.

@zerodytrash
Copy link
Owner

In the latest version (0.9.28) the profile image array is available via data.userDetails.profilePictureUrls.

You can find a jpg via:

const jpegProfilePicture = data.userDetails?.profilePictureUrls?.find(x => x.includes('.jpeg'));

Example Event Data:

WebcastChatMessage {
  comment: '😂😂😂',
  userId: '6928430119611335685',
  secUid: 'MS4wLjABAAAAQMl3FAUP9bCT29ieRbQx8YvPcAI_e2596c3MYMBMg_odDU4YzWwDDLOL6JWrpQEr',
  uniqueId: 'devilsbride91',
  nickname: 'devilsbride',
  profilePictureUrl: 'https://p77-sign-va.tiktokcdn.com/tos-maliva-avt-0068/f102899a6131d40e1ca9ecddb7314349~c5_100x100.webp?x-expires=1661176800&x-signature=CSC2yALMXjrsl%2BlmSJOUFlZ1ODI%3D',
  followRole: 1,
  userBadges: [],
  userDetails: {
    createTime: '0',
    bioDescription: '',
    profilePictureUrls: [ // <== THIS is new
      'https://p16-sign-va.tiktokcdn.com/tos-maliva-avt-0068/f102899a6131d40e1ca9ecddb7314349~tplv-tiktok-shrink:72:72.webp?x-expires=1661176800&x-signature=4VqC%2FbrmVxkrVR4aMP%2FIgmc%2B20A%3D',
      'https://p16-sign-va.tiktokcdn.com/tos-maliva-avt-0068/f102899a6131d40e1ca9ecddb7314349~c5_100x100.webp?x-expires=1661176800&x-signature=81g0SNVnDkL20PbJsKtgrt8Sx88%3D',
      'https://p77-sign-va.tiktokcdn.com/tos-maliva-avt-0068/f102899a6131d40e1ca9ecddb7314349~c5_100x100.webp?x-expires=1661176800&x-signature=CSC2yALMXjrsl%2BlmSJOUFlZ1ODI%3D',
      'https://p16-sign-va.tiktokcdn.com/tos-maliva-avt-0068/f102899a6131d40e1ca9ecddb7314349~c5_100x100.jpeg?x-expires=1661176800&x-signature=0T0geAAAB3r%2BbxMZ1LpPgbwG7%2BA%3D'
    ]
  },
  followInfo: {
    followingCount: 524,
    followerCount: 986,
    followStatus: 1,
    pushStatus: 0
  },
  isModerator: false,
  isNewGifter: false,
  isSubscriber: false,
  topGifterRank: null,
  msgId: '7133968425823406853',
  createTime: '1661006480946'
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants