crewAI icon indicating copy to clipboard operation
crewAI copied to clipboard

fix: resolve YoutubeChannelSearchTool url parsing for issue #5429

Open aarushisingh04 opened this issue 7 months ago • 1 comments

fixes #5429

description

the YoutubeChannelSearchTool failed to process raw handle (@krishnaik06) and full URL (https://www.youtube.com/@...) inputs because it blindly prepended @ to the string regardless of input format.

this fix converts both shorthand handles and full channel URLs into a canonical URL so the adapter processes them correctly.

additionally added defensive shorthand URL normalization directly into YoutubeChannelLoader so the loader can flexibly resolve channel inputs if used directly, independent of the tool parsing.

changes made

  • youtube_channel_search_tool.py: updated add() to correctly handle and canonicalize full https:// URLs versus bare string shorthand handles.
  • youtube_channel_loader.py: added base-level URL normalization immediately prior to URL validation regex matching.
  • testing: added parameterized validation tests covering bare handles, @-prepended handles, and fully-qualified youtube /channel/ and @ URLs. also mocked a new loader test intercept.

aarushisingh04 avatar Apr 13 '26 19:04 aarushisingh04

This PR is stale because it has been open for 45 days with no activity.

github-actions[bot] avatar May 29 '26 13:05 github-actions[bot]