Hello,

I prepared a patch to fix this issue. It should replace patches/pubsuffix.diff. A dependency on |publicsuffix also needs to be added.|

Best regards,
Michel Le Bihan
Author: Michel Le Bihan <[email protected]>
Subject: Use list of suffixes from publicsuffix package

--- a/tldextract/suffix_list.py
+++ b/tldextract/suffix_list.py
@@ -106,10 +106,8 @@
         )
     except SuffixListNotFound as exc:
         if fallback_to_snapshot:
-            maybe_pkg_data = pkgutil.get_data("tldextract", ".tld_set_snapshot")
-            # package maintainers guarantee file is included
-            pkg_data = cast(bytes, maybe_pkg_data)
-            text = pkg_data.decode("utf-8")
+            with open("/usr/share/publicsuffix/public_suffix_list.dat") as public_suffix_file:
+                text = public_suffix_file.read()
         else:
             raise exc
 
--- a/tldextract/tldextract.py
+++ b/tldextract/tldextract.py
@@ -56,8 +56,6 @@
 CACHE_TIMEOUT = os.environ.get("TLDEXTRACT_CACHE_TIMEOUT")
 
 PUBLIC_SUFFIX_LIST_URLS = (
-    "https://publicsuffix.org/list/public_suffix_list.dat";,
-    "https://raw.githubusercontent.com/publicsuffix/list/master/public_suffix_list.dat";,
 )
 
 

Reply via email to