-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwebdesign.py
More file actions
123 lines (102 loc) · 4.95 KB
/
Copy pathwebdesign.py
File metadata and controls
123 lines (102 loc) · 4.95 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
import csv
import random
from typing import List
def generate_high_quality_domains(seed_words: List[str], count: int = 500) -> List[str]:
"""
تولید نام دامنه های با کیفیت بالا با رعایت اصول نامگذاری موثر
"""
domains = set()
# ساختارهای بهینه شده برای دامنههای کوتاه و موثر
structures = [
# ساختارهای ساده و کوتاه
lambda w1, w2: f"{w1}{w2}",
lambda w1, w2: f"{w1}{w2}",
lambda w1, w2: f"{w1}{w2}",
# ساختارهای حرفهای
lambda w1, w2: f"{w1}ly",
lambda w1, w2: f"{w1}fy",
lambda w1, w2: f"{w1}io",
lambda w1, w2: f"{w1}ex",
lambda w1, w2: f"{w1}ax",
lambda w1, w2: f"{w1}up",
lambda w1, w2: f"{w1}pro",
lambda w1, w2: f"{w1}hub",
lambda w1, w2: f"{w1}lab",
lambda w1, w2: f"{w1}app",
lambda w1, w2: f"get{w1}",
lambda w1, w2: f"try{w1}",
lambda w1, w2: f"my{w1}",
lambda w1, w2: f"max{w1}",
lambda w1, w2: f"top{w1}",
lambda w1, w2: f"new{w1}",
]
# کلمات بسیار کوتاه برای ترکیبات بهینه
short_prefixes = ["web", "net", "dig", "app", "pro", "max", "top", "new", "smart", "easy", "fast", "pure"]
short_suffixes = ["ly", "fy", "io", "ex", "ax", "ox", "up", "pro", "hub", "lab", "box", "zen"]
# کلمات کلیدی مرتبط با فناوری
tech_words = ["tech", "cloud", "data", "ai", "code", "dev", "soft", "cyber", "net", "web", "digi", "byte"]
while len(domains) < count:
# انتخاب دو کلمه کوتاه برای ترکیب
word1 = random.choice(seed_words)
word2 = random.choice(seed_words)
# اطمینان از کوتاه بودن کلمات انتخابی
if len(word1) > 4 or len(word2) > 4:
continue
# استفاده از ساختارهای اصلی
for structure in structures:
if len(domains) >= count:
break
domain = structure(word1, word2)
# فیلترهای سختگیرانه برای کیفیت
if (3 <= len(domain) <= 8 and # بسیار کوتاه
domain.isalpha() and # فقط حروف
len(set(domain)) >= 3 and # تنوع حروف
domain not in domains):
domains.add(domain)
# ترکیبات ویژه با کلمات فناوری
if random.random() < 0.3:
tech_word = random.choice(tech_words)
short_word = random.choice([w for w in seed_words if len(w) <= 3])
combinations = [
f"{tech_word}{short_word}",
f"{short_word}{tech_word}",
f"{random.choice(short_prefixes)}{tech_word}",
f"{tech_word}{random.choice(short_suffixes)}",
f"{random.choice(short_prefixes)}{short_word}",
f"{short_word}{random.choice(short_suffixes)}",
]
for combo in combinations:
if (4 <= len(combo) <= 8 and
combo.isalpha() and
combo not in domains):
domains.add(combo)
return list(domains)[:count]
def save_to_csv(domains: List[str], filename: str = "premium_domains.csv"):
"""
ذخیره نام دامنه ها در فایل CSV (فقط نام دامنه)
"""
with open(filename, 'w', newline='', encoding='utf-8') as csvfile:
writer = csv.writer(csvfile)
writer.writerow(['Domain Name']) # فقط هدر
for domain in domains:
writer.writerow([domain])
# لیست کلمات بسیار کوتاه و موثر فارسی
short_persian_words = [
# کلمات بسیار کوتاه (2-4 حرفی)
'ara', 'saz', 'kar', 'fan', 'ray', 'ban', 'sab', 'meh', 'rav', 'kav',
'por', 'tiz', 'ram', 'min', 'lav', 'pou', 'gol', 'mor', 'dar', 'kuh',
'sta', 'mah', 'bad', 'nar', 'yal', 'yas', 'sib', 'ran', 'neg', 'baz',
'for', 'kha', 'tej', 'san', 'ser', 'mar', 'mod', 'web', 'net', 'dig',
'app', 'pro', 'max', 'top', 'new', 'get', 'try', 'my', 'zen', 'box',
'ex', 'ax', 'up', 'ly', 'fy', 'io', 'ai', 'tech', 'data', 'cloud'
]
# تولید 500 نام دامنه با کیفیت بالا
premium_domains = generate_high_quality_domains(short_persian_words, 500)
# ذخیره در فایل CSV
save_to_csv(premium_domains)
print(f"تولید {len(premium_domains)} نام دامنه پریمیوم با موفقیت انجام شد!")
print("فایل 'premium_domains.csv' ایجاد شد.")
# نمایش نمونهای از بهترین دامنهها
print("\nنمونههایی از بهترین دامنههای تولید شده:")
for i, domain in enumerate(premium_domains[:20]):
print(f"{domain}")