bs4.Doctype.isnumeric

Doctype.isnumeric() → bool

Return True if there are only numeric characters in S, False otherwise.