PyFunceble.query.whois.converter package¶
Submodules¶
PyFunceble.query.whois.converter.base module¶
The tool to check the availability or syntax of domain, IP or URL.
██████╗ ██╗ ██╗███████╗██╗ ██╗███╗ ██╗ ██████╗███████╗██████╗ ██╗ ███████╗
██╔══██╗╚██╗ ██╔╝██╔════╝██║ ██║████╗ ██║██╔════╝██╔════╝██╔══██╗██║ ██╔════╝
██████╔╝ ╚████╔╝ █████╗ ██║ ██║██╔██╗ ██║██║ █████╗ ██████╔╝██║ █████╗
██╔═══╝ ╚██╔╝ ██╔══╝ ██║ ██║██║╚██╗██║██║ ██╔══╝ ██╔══██╗██║ ██╔══╝
██║ ██║ ██║ ╚██████╔╝██║ ╚████║╚██████╗███████╗██████╔╝███████╗███████╗
╚═╝ ╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═══╝ ╚═════╝╚══════╝╚═════╝ ╚══════╝╚══════╝
Provides the base of all WHOIS converter/extracter class.
- Author:
- Nissar Chababy, @funilrys, contactTATAfunilrysTODTODcom
- Special thanks:
- https://pyfunceble.github.io/#/special-thanks
- Contributors:
- https://pyfunceble.github.io/#/contributors
- Project link:
- https://github.com/funilrys/PyFunceble
- Project documentation:
- https://pyfunceble.readthedocs.io/en/latest/
- Project homepage:
- https://pyfunceble.github.io/
License:
Copyright 2017, 2018, 2019, 2020, 2021 Nissar Chababy
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-
class
PyFunceble.query.whois.converter.base.
ConverterBase
(data_to_convert: Optional[Any] = None)[source]¶ Bases:
object
Provides the base of all converter class.
-
data_to_convert
¶ Provides the current state of the
_data_to_convert
attribute.
-
PyFunceble.query.whois.converter.digit2digits module¶
The tool to check the availability or syntax of domain, IP or URL.
██████╗ ██╗ ██╗███████╗██╗ ██╗███╗ ██╗ ██████╗███████╗██████╗ ██╗ ███████╗
██╔══██╗╚██╗ ██╔╝██╔════╝██║ ██║████╗ ██║██╔════╝██╔════╝██╔══██╗██║ ██╔════╝
██████╔╝ ╚████╔╝ █████╗ ██║ ██║██╔██╗ ██║██║ █████╗ ██████╔╝██║ █████╗
██╔═══╝ ╚██╔╝ ██╔══╝ ██║ ██║██║╚██╗██║██║ ██╔══╝ ██╔══██╗██║ ██╔══╝
██║ ██║ ██║ ╚██████╔╝██║ ╚████║╚██████╗███████╗██████╔╝███████╗███████╗
╚═╝ ╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═══╝ ╚═════╝╚══════╝╚═════╝ ╚══════╝╚══════╝
Provides an easy way to convert a digit string to 2 digits.
- Author:
- Nissar Chababy, @funilrys, contactTATAfunilrysTODTODcom
- Special thanks:
- https://pyfunceble.github.io/#/special-thanks
- Contributors:
- https://pyfunceble.github.io/#/contributors
- Project link:
- https://github.com/funilrys/PyFunceble
- Project documentation:
- https://pyfunceble.readthedocs.io/en/latest/
- Project homepage:
- https://pyfunceble.github.io/
License:
Copyright 2017, 2018, 2019, 2020, 2021 Nissar Chababy
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-
class
PyFunceble.query.whois.converter.digit2digits.
Digit2Digits
(data_to_convert: Optional[Any] = None)[source]¶ Bases:
PyFunceble.query.whois.converter.base.ConverterBase
Converts a given digit to a 2 digits string.
-
data_to_convert
¶ Provides the current state of the
_data_to_convert
attribute.
-
PyFunceble.query.whois.converter.expiration_date module¶
The tool to check the availability or syntax of domain, IP or URL.
██████╗ ██╗ ██╗███████╗██╗ ██╗███╗ ██╗ ██████╗███████╗██████╗ ██╗ ███████╗
██╔══██╗╚██╗ ██╔╝██╔════╝██║ ██║████╗ ██║██╔════╝██╔════╝██╔══██╗██║ ██╔════╝
██████╔╝ ╚████╔╝ █████╗ ██║ ██║██╔██╗ ██║██║ █████╗ ██████╔╝██║ █████╗
██╔═══╝ ╚██╔╝ ██╔══╝ ██║ ██║██║╚██╗██║██║ ██╔══╝ ██╔══██╗██║ ██╔══╝
██║ ██║ ██║ ╚██████╔╝██║ ╚████║╚██████╗███████╗██████╔╝███████╗███████╗
╚═╝ ╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═══╝ ╚═════╝╚══════╝╚═════╝ ╚══════╝╚══════╝
Provides our expiration date extracter.
- Author:
- Nissar Chababy, @funilrys, contactTATAfunilrysTODTODcom
- Special thanks:
- https://pyfunceble.github.io/#/special-thanks
- Contributors:
- https://pyfunceble.github.io/#/contributors
- Project link:
- https://github.com/funilrys/PyFunceble
- Project documentation:
- https://pyfunceble.readthedocs.io/en/latest/
- Project homepage:
- https://pyfunceble.github.io/
License:
Copyright 2017, 2018, 2019, 2020, 2021 Nissar Chababy
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-
class
PyFunceble.query.whois.converter.expiration_date.
ExpirationDateExtractor
(data_to_convert: Optional[Any] = None)[source]¶ Bases:
PyFunceble.query.whois.converter.base.ConverterBase
Provides an interface for the extraction of the expiration date.
-
MARKER2DATE_REGEX
= {'1': '([0-9]{2})-([a-z]{3})-([0-9]{4})', '10': '([0-9]{2})\\.([0-9]{2})\\.([0-9]{4})\\s[0-9]{2}:[0-9]{2}:[0-9]{2}', '11': '([0-9]{2})-([A-Z]{1}[a-z]{2})-([0-9]{4})\\s[0-9]{2}:[0-9]{2}:[0-9]{2}\\s[A-Z]{1}.*', '12': '([0-9]{4})\\/([0-9]{2})\\/([0-9]{2})\\s[0-9]{2}:[0-9]{2}:[0-9]{2}\\s\\(.*\\)', '13': '([0-9]{4})\\/([0-9]{2})\\/([0-9]{2})\\s[0-9]{2}:[0-9]{2}:[0-9]{2}$', '14': '[a-zA-Z]{3}\\s([a-zA-Z]{3})\\s([0-9]{2})\\s[0-9]{2}:[0-9]{2}:[0-9]{2}\\s[A-Z]{3}\\s([0-9]{4})', '15': '[a-zA-Z]{3}\\s([a-zA-Z]{3})\\s([0-9]{2})\\s([0-9]{4})', '16': '([0-9]{4})-([0-9]{2})-([0-9]{2})T[0-9]{2}:[0-9]{2}:[0-9]{2}$', '17': '([0-9]{4})-([0-9]{2})-([0-9]{2})T[0-9]{2}:[0-9]{2}:[0-9]{2}[A-Z].*', '18': '([0-9]{4})-([0-9]{2})-([0-9]{2})T[0-9]{2}:[0-9]{2}:[0-9]{2}[+-][0-9]{4}', '19': '([0-9]{4})-([0-9]{2})-([0-9]{2})T[0-9]{2}:[0-9]{2}:[0-9]{2}\\.[0-9].*[+-][0-9]{2}:[0-9]{2}', '2': '([0-9]{2})\\.([0-9]{2})\\.([0-9]{4})$', '20': '([0-9]{4})-([0-9]{2})-([0-9]{2})T[0-9]{2}:[0-9]{2}:[0-9]{2}\\.[0-9]{6}$', '21': '([0-9]{4})-([0-9]{2})-([0-9]{2})T[0-9]{2}:[0-9]{2}:[0-9]{2}\\.[0-9].*[A-Z]', '22': '([0-9]{2})-([0-9]{2})-([0-9]{4})', '23': '([0-9]{4})\\.\\s([0-9]{2})\\.\\s([0-9]{2})\\.', '24': '([0-9]{4})-([0-9]{2})-([0-9]{2})T[0-9]{2}:[0-9]{2}:[0-9]{2}[+-][0-9]{2}:[0-9]{2}', '25': '(?=[0-9]{8})(?=([0-9]{4})([0-9]{2})([0-9]{2}))', '26': '([0-9]{2})-([A-Z]{1}[a-z]{2})-([0-9]{4})$', '27': '([0-9]{2})\\.([0-9]{1})\\.([0-9]{4})', '28': '([0-9]{1,2})\\s([A-Z]{1}[a-z]{2})\\s([0-9]{4})', '29': '([0-9]{2})-([A-Z]{1}[a-z]*)-([0-9]{4})', '3': '([0-3][0-9])\\/(0[1-9]|1[012])\\/([0-9]{4})', '30': '([0-9]{4})-([A-Z]{1}[a-z]{2})-([0-9]{2})\\.', '31': '[a-zA-Z]{3}\\s([a-zA-Z]{3})\\s([0-9]{1,2})\\s[0-9]{2}:[0-9]{2}:[0-9]{2}\\s([0-9]{4})', '32': '()[a-zA-Z]{3}\\s([a-zA-Z]{3})\\s([0-9]{4})\\s[0-9]{2}:[0-9]{2}:[0-9]{2}', '33': '([A-Z]{1}[a-z]*)\\s([0-9]{1,2})\\s([0-9]{4})', '34': '([0-9]{1,2})\\.([0-9]{1,2})\\.([0-9]{4})', '35': '([0-9]{4})([0-9]{2})([0-9]{2})[0-9]+', '36': '(0[1-9]|1[012])\\/([0-3][0-9])\\/([0-9]{4})', '37': '([A-Z]{1}[a-z].*)\\s\\s([0-9]{1,2})\\s([0-9]{4})', '38': '([0-9]{1,})[a-z]{1,}\\s([A-Z].*)\\s(2[0-9]{3})', '4': '([0-9]{4})-([0-9]{2})-([0-9]{2})$', '5': '([0-9]{4})\\.([0-9]{2})\\.([0-9]{2})$', '6': '([0-9]{4})\\/([0-9]{2})\\/([0-9]{2})$', '7': '([0-9]{4})\\.([0-9]{2})\\.([0-9]{2})\\s[0-9]{2}:[0-9]{2}:[0-9]{2}', '8': '([0-9]{4})([0-9]{2})([0-9]{2})\\s[0-9]{2}:[0-9]{2}:[0-9]{2}', '9': '([0-9]{4})-([0-9]{2})-([0-9]{2})\\s[0-9]{2}:[0-9]{2}:[0-9]{2}'}¶ Provides all the known regex to extract the date.
Note
The index (or key) will be used to map or group some of them later.
-
PATTERNS
= ['expire:(.*)', 'expire on:(.*)', 'Expiry Date:(.*)', 'free-date(.*)', 'expires:(.*)', 'Expiration date:(.*)', 'Expiry date:(.*)', 'Expire Date:(.*)', 'renewal date:(.*)', 'Expires:(.*)', 'validity:(.*)', 'Expiration Date :(.*)', 'Expiry :(.*)', 'expires at:(.*)', 'domain_datebilleduntil:(.*)', 'Data de expiração \\/ Expiration Date \\(dd\\/mm\\/yyyy\\):(.*)', 'Fecha de expiración \\(Expiration date\\):(.*)', '\\[Expires on\\](.*)', 'Record expires on(.*)(\\(YYYY-MM-DD\\))', 'status: OK-UNTIL(.*)', 'renewal:(.*)', 'expires............:(.*)', 'expire-date:(.*)', 'Exp date:(.*)', 'Valid-date(.*)', 'Expires On:(.*)', 'Fecha de vencimiento:(.*)', 'Expiration:.........(.*)', 'Fecha de Vencimiento:(.*)', 'Registry Expiry Date:(.*)', 'Expires on..............:(.*)', 'Expiration Time:(.*)', 'Expiration Date:(.*)', 'Expired:(.*)', "Date d'expiration:(.*)", 'expiration date:(.*)']¶ Provides all our known patterns.
-
REGEX_DIGITS
= '[0-9]'¶ Provides the regex to match in order to extract the digits.
-
REGEX_PARSE_MAP
= [{'regex_keys': [1, 2, 3, 10, 11, 22, 26, 27, 28, 29, 32, 34, 38], 'positions': {'day': 0, 'month': 1, 'year': 2}}, {'regex_keys': [14, 15, 31, 33, 36, 37], 'positions': {'day': 1, 'month': 0, 'year': 2}}, {'regex_keys': [4, 5, 6, 7, 8, 9, 12, 13, 16, 17, 18, 19, 20, 21, 23, 24, 25, 30, 35], 'positions': {'day': 2, 'month': 1, 'year': 0}}]¶ Our parsing map. Indeed, we hava a list of regex, but no way to know how to parse them. Especially when the order (month, day, year) are different from a format to another.
This variable solve that problem by interpreting all regex we previously created.
-
data_to_convert
¶ Provides the current state of the
_data_to_convert
attribute.
-
PyFunceble.query.whois.converter.month2unified module¶
The tool to check the availability or syntax of domain, IP or URL.
██████╗ ██╗ ██╗███████╗██╗ ██╗███╗ ██╗ ██████╗███████╗██████╗ ██╗ ███████╗
██╔══██╗╚██╗ ██╔╝██╔════╝██║ ██║████╗ ██║██╔════╝██╔════╝██╔══██╗██║ ██╔════╝
██████╔╝ ╚████╔╝ █████╗ ██║ ██║██╔██╗ ██║██║ █████╗ ██████╔╝██║ █████╗
██╔═══╝ ╚██╔╝ ██╔══╝ ██║ ██║██║╚██╗██║██║ ██╔══╝ ██╔══██╗██║ ██╔══╝
██║ ██║ ██║ ╚██████╔╝██║ ╚████║╚██████╗███████╗██████╔╝███████╗███████╗
╚═╝ ╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═══╝ ╚═════╝╚══════╝╚═════╝ ╚══════╝╚══════╝
Provides a way to convert a given month to our unified format.
- Author:
- Nissar Chababy, @funilrys, contactTATAfunilrysTODTODcom
- Special thanks:
- https://pyfunceble.github.io/#/special-thanks
- Contributors:
- https://pyfunceble.github.io/#/contributors
- Project link:
- https://github.com/funilrys/PyFunceble
- Project documentation:
- https://pyfunceble.readthedocs.io/en/latest/
- Project homepage:
- https://pyfunceble.github.io/
License:
Copyright 2017, 2018, 2019, 2020, 2021 Nissar Chababy
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-
class
PyFunceble.query.whois.converter.month2unified.
Month2Unified
(data_to_convert: Optional[Any] = None)[source]¶ Bases:
PyFunceble.query.whois.converter.base.ConverterBase
Converts the given month into our unified format.
-
MAP
= {'apr': ['4', '04', 'apr', 'april', 'apr.'], 'aug': ['8', '08', 'aug', 'august', 'aug.'], 'dec': ['12', 'dec', 'december', 'dec.'], 'feb': ['2', '02', 'feb', 'february', 'feb.'], 'jan': ['1', '01', 'jan', 'january', 'jan.'], 'jul': ['7', '07', 'jul', 'july', 'jul.'], 'jun': ['6', '06', 'jun', 'june', 'jun.'], 'mar': ['3', '03', 'mar', 'march', 'mar.'], 'may': ['5', '05', 'may'], 'nov': ['11', 'nov', 'november', 'nov.'], 'oct': ['10', 'oct', 'october', 'oct.'], 'sep': ['9', '09', 'sep', 'september', 'sep.', 'sept', 'sept.']}¶
-
data_to_convert
¶ Provides the current state of the
_data_to_convert
attribute.
-
Module contents¶
The tool to check the availability or syntax of domain, IP or URL.
██████╗ ██╗ ██╗███████╗██╗ ██╗███╗ ██╗ ██████╗███████╗██████╗ ██╗ ███████╗
██╔══██╗╚██╗ ██╔╝██╔════╝██║ ██║████╗ ██║██╔════╝██╔════╝██╔══██╗██║ ██╔════╝
██████╔╝ ╚████╔╝ █████╗ ██║ ██║██╔██╗ ██║██║ █████╗ ██████╔╝██║ █████╗
██╔═══╝ ╚██╔╝ ██╔══╝ ██║ ██║██║╚██╗██║██║ ██╔══╝ ██╔══██╗██║ ██╔══╝
██║ ██║ ██║ ╚██████╔╝██║ ╚████║╚██████╗███████╗██████╔╝███████╗███████╗
╚═╝ ╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═══╝ ╚═════╝╚══════╝╚═════╝ ╚══════╝╚══════╝
Provides the converter or extractor around the WHOIS query logic.
- Author:
- Nissar Chababy, @funilrys, contactTATAfunilrysTODTODcom
- Special thanks:
- https://pyfunceble.github.io/#/special-thanks
- Contributors:
- https://pyfunceble.github.io/#/contributors
- Project link:
- https://github.com/funilrys/PyFunceble
- Project documentation:
- https://pyfunceble.readthedocs.io/en/latest/
- Project homepage:
- https://pyfunceble.github.io/
License:
Copyright 2017, 2018, 2019, 2020, 2021 Nissar Chababy
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.