TimeForANinja / node-ytsr

Do anonymous YouTube search requests.
MIT License
285 stars 66 forks source link

throws exception when there's no result of the query #147

Closed skinmaker1345 closed 2 years ago

skinmaker1345 commented 2 years ago
[
  {
    "backgroundPromoRenderer": {
      "title": {
        "runs": [
          {
            "text": "검색결과가 없습니다."
          }
        ]
      },
      "bodyText": {
        "runs": [
          {
            "text": "다른 검색어를 시도해 보거나 검색 필터를 삭제하세요."
          }
        ]
      },
      "icon": {
        "iconType": "EMPTY_SEARCH"
      },
      "trackingParams": "CD4Q92QYASITCObwvemIifQCFXWZVgEdYvgA4g==",
      "style": {
        "value": "BACKGROUND_PROMO_STYLE_TYPE_FULL_HEIGHT"
      }
    }
  },
  {
    "originalQuery": "ytChannelID",
    "correctedQuery": "ytChannelID",
    "results": 0,
    "activeFilters": [],
    "refinements": [
      {
        "q": "ytn Channel ID",
        "url": "https://www.youtube.com/results?search_query=ytn+Channel+ID&sp=EgIQAg%253D%253D",
        "bestThumbnail": null,
        "thumbnails": null
      }
    ],
    "items": [],
    "continuation": null
  }
]

as I refer to the text of the result, it says that there is no search result of the query. the search that I used: await ytsr(query, {limit: 20, hl: 'ko', gl: 'KR', filters: {type: "Channel"}}), query: ytChannelID

TimeForANinja commented 2 years ago

🤔 that file looks more like a "unknown type" error did ytsr not return an length-0 array as results?

github-actions[bot] commented 2 years ago

:tada: This issue has been resolved in version 3.6.0 :tada:

The release is available on:

Your semantic-release bot :package::rocket: