-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwebdev.py
More file actions
82 lines (69 loc) · 3.07 KB
/
Copy pathwebdev.py
File metadata and controls
82 lines (69 loc) · 3.07 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
import csv
import random
from typing import List
def generate_web_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}pro",
lambda w1, w2: f"{w1}{w2}dev",
lambda w1, w2: f"{w1}{w2}lab",
lambda w1, w2: f"{w1}{w2}hub",
lambda w1, w2: f"{w1}{w2}code",
lambda w1, w2: f"{w1}{w2}web",
lambda w1, w2: f"my{w1}{w2}",
lambda w1, w2: f"get{w1}{w2}",
]
short_prefixes = ["web", "net", "dev", "code", "pro", "site", "app", "soft"]
short_suffixes = ["hub", "lab", "box", "up", "it", "dev", "io"]
tech_words = ["web", "site", "code", "dev", "app", "soft", "net", "ui", "ux", "cloud", "ai", "data", "it"]
while len(domains) < count:
word1 = random.choice(seed_words)
word2 = random.choice(seed_words)
if len(word1) > 6 or len(word2) > 6:
continue
for structure in structures:
if len(domains) >= count:
break
domain = structure(word1, word2)
if (3 <= len(domain) <= 12 and
domain.replace("-", "").isalpha() and
domain not in domains):
domains.add(domain)
if random.random() < 0.4:
tech_word = random.choice(tech_words)
short_word = random.choice([w for w in seed_words if len(w) <= 5])
combos = [
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 combos:
if (4 <= len(combo) <= 12 and combo.isalpha() and combo not in domains):
domains.add(combo)
return list(domains)[:count]
def save_to_csv(domains: List[str], filename: str = "web_domains.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])
# کلمات پایه مرتبط با طراحی سایت و فریلنسری
seed_words = [
"web", "site", "net", "dev", "code", "app", "soft", "ui", "ux", "design", "team", "pro", "work",
"task", "job", "free", "lance", "gig", "project", "cloud", "data", "it"
]
premium_domains = generate_web_domains(seed_words, 500)
save_to_csv(premium_domains)
print(f"تولید {len(premium_domains)} دامنه مرتبط با طراحی وب و فریلنسری انجام شد.")
print("فایل 'web_domains.csv' ساخته شد.\n")
print("نمونهها:")
for d in premium_domains[:20]:
print(d)