Skip to content

Commit 3477849

Browse files
committed
Merge pull request joepie91#44 from afilipovich/develop
Fix for issue joepie91#28 Unicode parsing problems
2 parents d07cef1 + 937dd57 commit 3477849

File tree

4 files changed

+107
-1
lines changed

4 files changed

+107
-1
lines changed

pythonwhois/net.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,4 +104,4 @@ def whois_request(domain, server, port=43):
104104
if len(data) == 0:
105105
break
106106
buff += data
107-
return buff.decode("utf-8")
107+
return buff.decode("utf-8", "replace")

test/data/bidtheatre.com

Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
Whois Server v2.1.1 build 20140801151119 ADRS (C)2014 Active 24 ASA
2+
3+
Domain Information
4+
===================
5+
Domain.......: BIDTHEATRE.COM (DOM-469139)
6+
Status.......: OK
7+
Amended......: 2014-06-17 12:09:02 (CET/CEST)
8+
Created......: 2012-11-01 14:44:09 (CET/CEST)
9+
Expires......: 2014-11-01 14:44:09 (CET/CEST)
10+
Registrar....: Loopia (REG-3)
11+
DNSSec.......: No
12+
13+
Organisation Contact
14+
=======================
15+
ID...........: ORG-516871
16+
Name.........: Big Oh AB
17+
PostAddress..: Box 22201
18+
PostCode.....: 104 22
19+
PostArea.....: Stockholm
20+
Country......: SE
21+
Phone........: +46.708308163
22+
Fax..........:
23+
Email........: [email protected]
24+
25+
Administrative Contact
26+
=======================
27+
ID...........: UC-516872
28+
Name.........: Big Oh AB
29+
PostAddress..: Box 22201
30+
PostCode.....: 104 22
31+
PostArea.....: Stockholm
32+
Country......: SE
33+
Phone........: +46.708308163
34+
Fax..........:
35+
Email........: [email protected]
36+
37+
Technical Contact
38+
=======================
39+
ID...........: UC-135071
40+
Name.........: Loopia AB
41+
PostAddress..: Kopparbergsv�gen 8
42+
PostCode.....: 72213
43+
PostArea.....: V�ster�s
44+
Country......: SE
45+
Phone........: +46.21128222
46+
Fax..........: +46.21128233
47+
Email........: [email protected]
48+
49+
Billing Contact
50+
=======================
51+
ID...........: UC-135072
52+
Name.........: Loopia AB
53+
PostAddress..: Kopparbergsv�gen 8
54+
PostCode.....: 72213
55+
PostArea.....: V�ster�s
56+
Country......: SE
57+
Phone........: +46.21128222
58+
Fax..........: +46.21128233
59+
Email........: [email protected]
60+
61+
Name Servers
62+
=======================
63+
ns1.digitalocean.com (NS-26957)
64+
ns2.digitalocean.com (NS-26958)
65+
ns3.digitalocean.com (NS-26959)
66+
67+
Active 24 ASA as an accredited Registrar of generic top level domains,
68+
has collected this information for the use of providing WHOIS services
69+
according to the terms set in the Registrar Agreement by ICANN.
70+
This information is provided to you for information purposes only and
71+
is designed to assist persons in determining contents of a domain name
72+
registration record in the Active 24 ASA database. Active 24 ASA makes
73+
this information available to you "as is" and does not guarantee its
74+
accuracy. By submitting a WHOIS query, you agree that you will use this
75+
data only for lawful purposes and that, under no circumstances will you
76+
use this data: (1) to allow, enable, or otherwise support the
77+
transmission of mass unsolicited, commercial advertising or solicitations
78+
via direct mail, electronic mail, or by telephone; (2) in contravention
79+
of any applicable data and privacy protection acts; or (3) to enable high
80+
volume, automated, electronic processes that apply to the registry
81+
(or its systems). Compilation, repackaging, dissemination, or other use
82+
of the WHOIS database in its entirety, or of a substantial portion
83+
thereof, is not allowed without Active 24 ASA`s prior written permission.
84+
Active 24 ASA reserves the right to modify or change these conditions at
85+
any time without prior or subsequent notification of any kind.
86+
By executing this query, in any manner whatsoever, you agree to abide by
87+
these terms.
88+
89+
NOTE: FAILURE TO LOCATE A RECORD IN THE WHOIS DATABASE IS NOT INDICATIVE
90+
OF THE AVAILABILITY OF A DOMAIN NAME.
91+
92+
93+
--
94+
Domain Name: BIDTHEATRE.COM
95+
Registrar: ACTIVE 24 AS
96+
Whois Server: whois.active24.com
97+
Referral URL: http://www.active24.com
98+
Name Server: NS1.DIGITALOCEAN.COM
99+
Name Server: NS2.DIGITALOCEAN.COM
100+
Name Server: NS3.DIGITALOCEAN.COM
101+
Status: ok
102+
Updated Date: 17-jun-2014
103+
Creation Date: 01-nov-2012
104+
Expiration Date: 01-nov-2014

test/target_default/bidtheatre.com

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"updated_date": ["2014-06-17T00:00:00"], "status": ["ok"], "contacts": {"admin": null, "tech": null, "registrant": null, "billing": null}, "nameservers": ["=======================", "ns1.digitalocean.com", "ns2.digitalocean.com", "ns3.digitalocean.com"], "expiration_date": ["2014-11-01T14:44:09"], "creation_date": ["2012-11-01T14:44:09"], "raw": ["Whois Server v2.1.1 build 20140801151119 ADRS (C)2014 Active 24 ASA\n\nDomain Information\n===================\nDomain.......: BIDTHEATRE.COM (DOM-469139)\nStatus.......: OK\nAmended......: 2014-06-17 12:09:02 (CET/CEST)\nCreated......: 2012-11-01 14:44:09 (CET/CEST)\nExpires......: 2014-11-01 14:44:09 (CET/CEST)\nRegistrar....: Loopia (REG-3)\nDNSSec.......: No\n\nOrganisation Contact\n=======================\nID...........: ORG-516871\nName.........: Big Oh AB\nPostAddress..: Box 22201\nPostCode.....: 104 22\nPostArea.....: Stockholm\nCountry......: SE\nPhone........: +46.708308163\nFax..........: \nEmail........: [email protected]\n\nAdministrative Contact\n=======================\nID...........: UC-516872\nName.........: Big Oh AB\nPostAddress..: Box 22201\nPostCode.....: 104 22\nPostArea.....: Stockholm\nCountry......: SE\nPhone........: +46.708308163\nFax..........: \nEmail........: [email protected]\n\nTechnical Contact\n=======================\nID...........: UC-135071\nName.........: Loopia AB\nPostAddress..: Kopparbergsv\ufffdgen 8\nPostCode.....: 72213\nPostArea.....: V\ufffdster\ufffds\nCountry......: SE\nPhone........: +46.21128222\nFax..........: +46.21128233\nEmail........: [email protected]\n\nBilling Contact\n=======================\nID...........: UC-135072\nName.........: Loopia AB\nPostAddress..: Kopparbergsv\ufffdgen 8\nPostCode.....: 72213\nPostArea.....: V\ufffdster\ufffds\nCountry......: SE\nPhone........: +46.21128222\nFax..........: +46.21128233\nEmail........: [email protected]\n\nName Servers\n=======================\nns1.digitalocean.com (NS-26957)\nns2.digitalocean.com (NS-26958)\nns3.digitalocean.com (NS-26959)\n\nActive 24 ASA as an accredited Registrar of generic top level domains,\nhas collected this information for the use of providing WHOIS services\naccording to the terms set in the Registrar Agreement by ICANN.\nThis information is provided to you for information purposes only and\nis designed to assist persons in determining contents of a domain name\nregistration record in the Active 24 ASA database. Active 24 ASA makes\nthis information available to you \"as is\" and does not guarantee its\naccuracy. By submitting a WHOIS query, you agree that you will use this\ndata only for lawful purposes and that, under no circumstances will you\nuse this data: (1) to allow, enable, or otherwise support the\ntransmission of mass unsolicited, commercial advertising or solicitations\nvia direct mail, electronic mail, or by telephone; (2) in contravention\nof any applicable data and privacy protection acts; or (3) to enable high\nvolume, automated, electronic processes that apply to the registry\n(or its systems). Compilation, repackaging, dissemination, or other use\n of the WHOIS database in its entirety, or of a substantial portion\nthereof, is not allowed without Active 24 ASA`s prior written permission.\nActive 24 ASA reserves the right to modify or change these conditions at\nany time without prior or subsequent notification of any kind.\nBy executing this query, in any manner whatsoever, you agree to abide by\nthese terms.\n\nNOTE: FAILURE TO LOCATE A RECORD IN THE WHOIS DATABASE IS NOT INDICATIVE\nOF THE AVAILABILITY OF A DOMAIN NAME.\n\n", " Domain Name: BIDTHEATRE.COM\n Registrar: ACTIVE 24 AS\n Whois Server: whois.active24.com\n Referral URL: http://www.active24.com\n Name Server: NS1.DIGITALOCEAN.COM\n Name Server: NS2.DIGITALOCEAN.COM\n Name Server: NS3.DIGITALOCEAN.COM\n Status: ok\n Updated Date: 17-jun-2014\n Creation Date: 01-nov-2012\n Expiration Date: 01-nov-2014\n"], "whois_server": ["whois.active24.com"], "registrar": ["ACTIVE 24 AS"], "emails": ["[email protected]", "[email protected]"]}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"updated_date": ["2014-06-17T00:00:00"], "status": ["ok"], "contacts": {"admin": null, "tech": null, "registrant": null, "billing": null}, "nameservers": ["=======================", "ns1.digitalocean.com", "ns2.digitalocean.com", "ns3.digitalocean.com"], "expiration_date": ["2014-11-01T14:44:09"], "creation_date": ["2012-11-01T14:44:09"], "raw": ["Whois Server v2.1.1 build 20140801151119 ADRS (C)2014 Active 24 ASA\n\nDomain Information\n===================\nDomain.......: BIDTHEATRE.COM (DOM-469139)\nStatus.......: OK\nAmended......: 2014-06-17 12:09:02 (CET/CEST)\nCreated......: 2012-11-01 14:44:09 (CET/CEST)\nExpires......: 2014-11-01 14:44:09 (CET/CEST)\nRegistrar....: Loopia (REG-3)\nDNSSec.......: No\n\nOrganisation Contact\n=======================\nID...........: ORG-516871\nName.........: Big Oh AB\nPostAddress..: Box 22201\nPostCode.....: 104 22\nPostArea.....: Stockholm\nCountry......: SE\nPhone........: +46.708308163\nFax..........: \nEmail........: [email protected]\n\nAdministrative Contact\n=======================\nID...........: UC-516872\nName.........: Big Oh AB\nPostAddress..: Box 22201\nPostCode.....: 104 22\nPostArea.....: Stockholm\nCountry......: SE\nPhone........: +46.708308163\nFax..........: \nEmail........: [email protected]\n\nTechnical Contact\n=======================\nID...........: UC-135071\nName.........: Loopia AB\nPostAddress..: Kopparbergsv\ufffdgen 8\nPostCode.....: 72213\nPostArea.....: V\ufffdster\ufffds\nCountry......: SE\nPhone........: +46.21128222\nFax..........: +46.21128233\nEmail........: [email protected]\n\nBilling Contact\n=======================\nID...........: UC-135072\nName.........: Loopia AB\nPostAddress..: Kopparbergsv\ufffdgen 8\nPostCode.....: 72213\nPostArea.....: V\ufffdster\ufffds\nCountry......: SE\nPhone........: +46.21128222\nFax..........: +46.21128233\nEmail........: [email protected]\n\nName Servers\n=======================\nns1.digitalocean.com (NS-26957)\nns2.digitalocean.com (NS-26958)\nns3.digitalocean.com (NS-26959)\n\nActive 24 ASA as an accredited Registrar of generic top level domains,\nhas collected this information for the use of providing WHOIS services\naccording to the terms set in the Registrar Agreement by ICANN.\nThis information is provided to you for information purposes only and\nis designed to assist persons in determining contents of a domain name\nregistration record in the Active 24 ASA database. Active 24 ASA makes\nthis information available to you \"as is\" and does not guarantee its\naccuracy. By submitting a WHOIS query, you agree that you will use this\ndata only for lawful purposes and that, under no circumstances will you\nuse this data: (1) to allow, enable, or otherwise support the\ntransmission of mass unsolicited, commercial advertising or solicitations\nvia direct mail, electronic mail, or by telephone; (2) in contravention\nof any applicable data and privacy protection acts; or (3) to enable high\nvolume, automated, electronic processes that apply to the registry\n(or its systems). Compilation, repackaging, dissemination, or other use\n of the WHOIS database in its entirety, or of a substantial portion\nthereof, is not allowed without Active 24 ASA`s prior written permission.\nActive 24 ASA reserves the right to modify or change these conditions at\nany time without prior or subsequent notification of any kind.\nBy executing this query, in any manner whatsoever, you agree to abide by\nthese terms.\n\nNOTE: FAILURE TO LOCATE A RECORD IN THE WHOIS DATABASE IS NOT INDICATIVE\nOF THE AVAILABILITY OF A DOMAIN NAME.\n\n", " Domain Name: BIDTHEATRE.COM\n Registrar: ACTIVE 24 AS\n Whois Server: whois.active24.com\n Referral URL: http://www.active24.com\n Name Server: NS1.DIGITALOCEAN.COM\n Name Server: NS2.DIGITALOCEAN.COM\n Name Server: NS3.DIGITALOCEAN.COM\n Status: ok\n Updated Date: 17-jun-2014\n Creation Date: 01-nov-2012\n Expiration Date: 01-nov-2014\n"], "whois_server": ["whois.active24.com"], "registrar": ["Active 24 AS"], "emails": ["[email protected]", "[email protected]"]}

0 commit comments

Comments
 (0)