fraudcrawler 0.3.9__py3-none-any.whl → 0.3.10__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of fraudcrawler might be problematic. Click here for more details.
- fraudcrawler/base/base.py +9 -2
- {fraudcrawler-0.3.9.dist-info → fraudcrawler-0.3.10.dist-info}/METADATA +1 -1
- {fraudcrawler-0.3.9.dist-info → fraudcrawler-0.3.10.dist-info}/RECORD +6 -6
- {fraudcrawler-0.3.9.dist-info → fraudcrawler-0.3.10.dist-info}/LICENSE +0 -0
- {fraudcrawler-0.3.9.dist-info → fraudcrawler-0.3.10.dist-info}/WHEEL +0 -0
- {fraudcrawler-0.3.9.dist-info → fraudcrawler-0.3.10.dist-info}/entry_points.txt +0 -0
fraudcrawler/base/base.py
CHANGED
|
@@ -6,6 +6,7 @@ from pydantic import (
|
|
|
6
6
|
model_validator,
|
|
7
7
|
)
|
|
8
8
|
from pydantic_settings import BaseSettings
|
|
9
|
+
import re
|
|
9
10
|
from typing import List
|
|
10
11
|
|
|
11
12
|
import aiohttp
|
|
@@ -48,11 +49,17 @@ class Host(BaseModel):
|
|
|
48
49
|
name: str
|
|
49
50
|
domains: str | List[str]
|
|
50
51
|
|
|
52
|
+
@staticmethod
|
|
53
|
+
def _normalize_domain(domain: str) -> str:
|
|
54
|
+
"""Make it lowercase and strip 'www.' and 'https?://' prefixes from the domain."""
|
|
55
|
+
domain = domain.strip().lower()
|
|
56
|
+
return re.sub(r"^(https?://)?(www\.)?", "", domain)
|
|
57
|
+
|
|
51
58
|
@field_validator("domains", mode="before")
|
|
52
|
-
def
|
|
59
|
+
def normalize_domains(cls, val):
|
|
53
60
|
if isinstance(val, str):
|
|
54
61
|
val = val.split(",")
|
|
55
|
-
return [dom.strip()
|
|
62
|
+
return [cls._normalize_domain(dom.strip()) for dom in val]
|
|
56
63
|
|
|
57
64
|
|
|
58
65
|
class Location(BaseModel):
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
fraudcrawler/__init__.py,sha256=2EgoTb2jNcQt1NxUV8za0154kb7ZnHZ_KeKgx21rdFs,679
|
|
2
2
|
fraudcrawler/base/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
3
|
-
fraudcrawler/base/base.py,sha256=
|
|
3
|
+
fraudcrawler/base/base.py,sha256=woesbPztEh7tbD0ty9S37JbFrbEC-01H9etmCT2ffnc,4771
|
|
4
4
|
fraudcrawler/base/client.py,sha256=GcTUMqLfvweLFdHy6CP9tgxsFQiPkc6KyiLcwLnDiw8,4412
|
|
5
5
|
fraudcrawler/base/google-languages.json,sha256=z0VtjMCsCcZq11OkCIb9jMDD1p9Ty4lhV7bq4ddYvec,10748
|
|
6
6
|
fraudcrawler/base/google-locations.json,sha256=UtNu0iSStllvFRTQXMobWKmZR1hKmtgtHftLNgaJTT0,9204345
|
|
@@ -13,8 +13,8 @@ fraudcrawler/scraping/enrich.py,sha256=X1BBZshdZqPmbduzhGwH0ULSzq03L_7bf7_UL8yOQ
|
|
|
13
13
|
fraudcrawler/scraping/serp.py,sha256=xBXqBcgO25xtiV3CnTLRuUeKIpnWGaAyDqF7KeGAcks,11750
|
|
14
14
|
fraudcrawler/scraping/zyte.py,sha256=ggI4iYG-E_UyiKgUpEFekeUd1giifEfJ_uyFUSJGSLY,6296
|
|
15
15
|
fraudcrawler/settings.py,sha256=1SVxjwMLuZd_rr3KkwYoRozTBw2VQU-OJQkgA33k95Q,768
|
|
16
|
-
fraudcrawler-0.3.
|
|
17
|
-
fraudcrawler-0.3.
|
|
18
|
-
fraudcrawler-0.3.
|
|
19
|
-
fraudcrawler-0.3.
|
|
20
|
-
fraudcrawler-0.3.
|
|
16
|
+
fraudcrawler-0.3.10.dist-info/LICENSE,sha256=B-3FuHfe3S0fWAlKlceskPcRhzXq81g-rJ-ddUYb4O8,1062
|
|
17
|
+
fraudcrawler-0.3.10.dist-info/METADATA,sha256=Nkr3t_4q_pejrdBFyzbOq9ePlauQwy-ZM_Njr1n6OSk,5966
|
|
18
|
+
fraudcrawler-0.3.10.dist-info/WHEEL,sha256=RaoafKOydTQ7I_I3JTrPCg6kUmTgtm4BornzOqyEfJ8,88
|
|
19
|
+
fraudcrawler-0.3.10.dist-info/entry_points.txt,sha256=1Befm7cM6945y2AA1z9V4gZV63mtSWcAs7ypvgux_Xg,79
|
|
20
|
+
fraudcrawler-0.3.10.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|