Example: AtUri.from_str("at://100ideas.bsky.social").hostname
returns: at:
should return: 100ideas.bsky.social
Fix: This implementation is based on a REGEX string from bluesky-social and they've updated and changed this string. Making similar change here fixes the problem.
In packages/atproto_core/uri/uri.py change _ATP_URI_REGEX
from: _ATP_URI_REGEX = r'^(at:\/\/)?((?:did:[a-z0-9:%-]+)|(?:[a-z][a-z0-9.:-]*))(\/[^?#\s]*)?(\?[^#\s]+)?(#[^\s]+)?$'
to : _ATP_URI_REGEX = r'^(at:\/\/)?((?:did:[a-z0-9:%-]+)|(?:[a-z0-9][a-z0-9.:-]*))(\/[^?#\s]*)?(\?[^#\s]+)?(#[^\s]+)?$'
Example: AtUri.from_str("at://100ideas.bsky.social").hostname returns: at: should return: 100ideas.bsky.social
Fix: This implementation is based on a REGEX string from bluesky-social and they've updated and changed this string. Making similar change here fixes the problem.
In packages/atproto_core/uri/uri.py change _ATP_URI_REGEX
based on ref: https://github.com/bluesky-social/atproto/blob/8c19ce991a766fd9cff5023160853ab1cb106f21/packages/uri/src/index.ts#LL5C38-L5C38
Thanks