File: basic.py

package info (click to toggle)
python-pyfunceble 4.2.29.dev-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 4,108 kB
  • sloc: python: 27,413; sh: 142; makefile: 27
file content (18 lines) | stat: -rw-r--r-- 533 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
"""
This is a basic example which prints one of the availability of
the given domain and URL.

.. note:
    Official output: ACTIVE, INACTIVE, INVALID
"""

from PyFunceble import DomainAndIPAvailabilityChecker, URLAvailabilityChecker

if __name__ == "__main__":
    print("Start of basic example.")
    DOMAIN = "github.com"
    URL = f"https://{DOMAIN}"

    print(DOMAIN, DomainAndIPAvailabilityChecker(DOMAIN).get_status().status)
    print(URL, URLAvailabilityChecker(URL).get_status().status)
    print("End of basic example ")