goalie.has_internet

goalie.has_internet() bool

Check whether an internet connection is available.

Attempts a socket connection to 8.8.8.8 on port 53.

Returns:

True if the connection succeeds.

Return type:

bool

Examples

>>> isinstance(has_internet(), bool)
True