It seems like '5187621769' should be a very easy number for the phonenumbers library to parse. It's 10 digits with a US area code. But...no luck.
Setup:
import phonenumbers
number = '5187621769'
Method 1:
parsed = phonenumbers.parse(number)
This throws an error.
Method 2:
parsed = phonenumbers.parse("+" + number)
Gives country code = 51, which is not US.
I know I can do:
parsed = phonenumbers.parse(number,region="US")
But I don't always know the number will be US (this is just one case where I discovered I wasn't getting desired behavior). Is there an option or formatting trick I'm missing? Thanks!