fix: include dots in YouTube handle regex extraction
Some checks are pending
NordaBiz Tests / Unit & Integration Tests (push) Waiting to run
NordaBiz Tests / E2E Tests (Playwright) (push) Blocked by required conditions
NordaBiz Tests / Smoke Tests (Production) (push) Blocked by required conditions
NordaBiz Tests / Send Failure Notification (push) Blocked by required conditions
Some checks are pending
NordaBiz Tests / Unit & Integration Tests (push) Waiting to run
NordaBiz Tests / E2E Tests (Playwright) (push) Blocked by required conditions
NordaBiz Tests / Smoke Tests (Production) (push) Blocked by required conditions
NordaBiz Tests / Send Failure Notification (push) Blocked by required conditions
The regex [A-Za-z0-9_-]+ truncated handles containing dots (e.g. @prosport.rowery → prosport), causing API lookups to resolve to wrong channels. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
fe288f0441
commit
ef8257486a
@ -57,13 +57,13 @@ class YouTubeService:
|
||||
if match:
|
||||
return match.group(1)
|
||||
|
||||
# Handle (@username)
|
||||
match = re.search(r'youtube\.com/@([A-Za-z0-9_-]+)', url)
|
||||
# Handle (@username) — dots allowed in YouTube handles
|
||||
match = re.search(r'youtube\.com/@([A-Za-z0-9._-]+)', url)
|
||||
if match:
|
||||
return match.group(1) # Return without @
|
||||
|
||||
# Legacy /c/ and /user/ formats
|
||||
match = re.search(r'youtube\.com/(?:c|user)/([A-Za-z0-9_-]+)', url)
|
||||
match = re.search(r'youtube\.com/(?:c|user)/([A-Za-z0-9._-]+)', url)
|
||||
if match:
|
||||
return match.group(1)
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user