I used aiotube recently and continuously got Attribute Error for a valid youtube id "kyAV-pzQwzU", and on further investigation i found that there is a problem with the regex pattern that is being used, the pattern does not consider "-" (hyphens) in it's logic and only considers alphanumeric characters.
pattern = re.compile('.be/(.*?)$|=(.*?)$|^(\w{11})$') # noqa, Line 20, video.py as well as stream.py & any other file where this pattern is used.
the correct pattern should be,
pattern = re.compile(r'.be/(.*?)$|=(.*?)$|^([\w\-]{11})$')
Hope this helps, would love to further support the development.
Thank you,
Aditya.
I used aiotube recently and continuously got Attribute Error for a valid youtube id "kyAV-pzQwzU", and on further investigation i found that there is a problem with the regex pattern that is being used, the pattern does not consider "-" (hyphens) in it's logic and only considers alphanumeric characters.
pattern = re.compile('.be/(.*?)$|=(.*?)$|^(\w{11})$') # noqa
, Line 20, video.py as well as stream.py & any other file where this pattern is used.the correct pattern should be,
pattern = re.compile(r'.be/(.*?)$|=(.*?)$|^([\w\-]{11})$')
Hope this helps, would love to further support the development. Thank you, Aditya.