twitchdev / issues

Issue tracker for third party developers.
Apache License 2.0
72 stars 7 forks source link

Kraken clip api when searching for a game that has a comma on the name will not work properly #432

Closed fgl27 closed 11 months ago

fgl27 commented 3 years ago

Brief description

Kraken clip api when searching for a game that has a comma on the name will not work properly, only the word/text before the first comma of the game name is taken in consideration.

For a long time yours API is malfunctioning on this case, please take a look, as helix is not a replacement, helix is missing search by language and the vod offset value.

This is a list of live games that have a comma on the name, most views order on the day of search:

  1. Pools, Hot Tubs, and Beaches
  2. Cook, Serve, Delicious! 3?!
  3. Papers, Please
  4. Test, Test
  5. Dr. Livingstone, I Presume?
  6. Pokémon: Let's Go, Eevee!
  7. Warhammer 40,000: Space Marine
  8. Pokémon: Let's Go, Pikachu!
  9. Warhammer 40,000: Dawn of War II
  10. Warhammer 40,000: Dawn of War II - Retribution - Complete DLC Collection
  11. Zero Escape: Nine Hours, Nine Persons, Nine Doors
  12. Warhammer 40,000: Inquisitor - Martyr
  13. Motorcycle, tricycle, ATV hill racing
  14. Warhammer 40,000: Mechanicus
  15. Football, Tactics & Glory
  16. Warhammer 40,000: Dawn of War
  17. Fortune's Tavern - Fantasy Tavern Simulation, Remastered

How to reproduce

Use the below link too see that the games returned are wrong

curl -H 'Accept: application/vnd.twitchtv.v5+json' \
-H 'Client-ID: 5seja5ptej058mxqy7gh5tcudjqtm9' \
-X GET 'https://api.twitch.tv/kraken/clips/top?game=Pools%2C%20Hot%20Tubs%2C%20and%20Beaches&limit=1&period=all' \
| jq -r ".clips[0].game"

Result

Pools

A person steamed on a section "Pools" that doesn't exist.

full result:

curl -H 'Accept: application/vnd.twitchtv.v5+json' \
-H 'Client-ID: 5seja5ptej058mxqy7gh5tcudjqtm9' \
-X GET 'https://api.twitch.tv/kraken/clips/top?game=Pools%2C%20Hot%20Tubs%2C%20and%20Beaches&limit=1&period=all' \
| jq -r ".clips[0]"
{
  "slug": "BadCrazySnoodWholeWheat-0BcTWWJL1Anp83r8",
  "tracking_id": "1205454320",
  "url": "https://clips.twitch.tv/BadCrazySnoodWholeWheat-0BcTWWJL1Anp83r8?tt_medium=clips_api&tt_content=url",
  "embed_url": "https://clips.twitch.tv/embed?clip=BadCrazySnoodWholeWheat-0BcTWWJL1Anp83r8&tt_medium=clips_api&tt_content=embed",
  "embed_html": "<iframe src='https://clips.twitch.tv/embed?clip=BadCrazySnoodWholeWheat-0BcTWWJL1Anp83r8&tt_medium=clips_api&tt_content=embed' width='640' height='360' frameborder='0' scrolling='no' allowfullscreen='true'></iframe>",
  "broadcaster": {
    "id": "43029746",
    "name": "harmaakorva",
    "display_name": "Harmaakorva",
    "channel_url": "https://www.twitch.tv/harmaakorva",
    "logo": "https://static-cdn.jtvnw.net/jtv_user_pictures/01dcbd2c-739d-4e5b-ad80-a58857ac4ff4-profile_image-300x300.png"
  },
  "curator": {
    "id": "96584950",
    "name": "swagmonkeybananas",
    "display_name": "SwagMonkeyBananas",
    "channel_url": "https://www.twitch.tv/swagmonkeybananas",
    "logo": "https://static-cdn.jtvnw.net/jtv_user_pictures/8eddf08d-2911-4e1f-8120-85b9eb06784d-profile_image-150x150.png"
  },
  "vod": {
    "id": "1045037305",
    "url": "https://www.twitch.tv/videos/1045037305?t=2m37s",
    "offset": 157,
    "preview_image_url": "https://clips-media-assets2.twitch.tv/AT-cm%7C1205454320-preview.jpg"
  },
  "broadcast_id": "42257376476",
  "game": "Pools",
  "language": "fi",
  "title": "HeyGuys",
  "views": 54,
  "duration": 6.48,
  "created_at": "2021-06-04T00:07:15Z",
  "thumbnails": {
    "medium": "https://clips-media-assets2.twitch.tv/AT-cm%7C1205454320-preview-480x272.jpg",
    "small": "https://clips-media-assets2.twitch.tv/AT-cm%7C1205454320-preview-260x147.jpg",
    "tiny": "https://clips-media-assets2.twitch.tv/AT-cm%7C1205454320-preview-86x45.jpg"
  }
}

Expected behavior

Show the same result as the site

https://www.twitch.tv/directory/game/Pools%2C%20Hot%20Tubs%2C%20and%20Beaches/clips?range=all

Screenshots

NA

Additional context or questions

NA

Xemdo commented 11 months ago

The /kraken/ endpoints are no longer accessible as of February 28th, 2022. For more information: https://discuss.dev.twitch.tv/t/legacy-twitch-api-v5-i-e-kraken-shutdown-reminder-february-28-2022/36589