介绍
SEO关键词组合工具可以帮助你快速组合各种关键词。将要组合关键词输入到各区中,一次可以输入多个关键词。点击生成关键词,就能在几秒钟之内生成上千个关键词组合!
提高工作效率,使用方法很简单。
关键词组合工具组合方式
前缀(地区)+修饰语(品牌、型号、用途)+产品名称+后缀(价格、厂家、供应商、批发等);
公司名+产品名称
地区+产品名
型号+产品名
地区+型号+产品名
seo关键词组合工具

[Python]代码如下:

  1. import requests
  2. import json
  3. import tkinter as tk
  4. from tkinter import ttk
  5. import calendar
  6. from datetime import datetime
  7. import itertools
  8. from tkcalendar import DateEntry
  9. from tkinter.messagebox import showerror
  10. # 创建Tkinter的主窗口
  11. root = tk.Tk()
  12. root.title(“关键词组合工具-墨墨-kiahuayu”)
  13. root.geometry(‘760×330’)
  14. # 创建并放置文本框
  15. t = tk.Text(root, width=25, height=20)
  16. t.grid(row=1, column=0)
  17. t1 = tk.Text(root, width=25, height=20)
  18. t1.grid(row=1, column=1)
  19. t2 = tk.Text(root, width=25, height=20)
  20. t2.grid(row=1, column=2)
  21. t3 = tk.Text(root, width=30, height=20)
  22. t3.grid(row=1, column=3)
  23. # 创建标签
  24. tk.Label(root, text=”关键词1″, width=15).grid(row=0, column=0)
  25. tk.Label(root, text=”关键词2″, width=15).grid(row=0, column=1)
  26. tk.Label(root, text=”关键词3″, width=15).grid(row=0, column=2)
  27. tk.Label(root, text=”组合关键词”, width=15).grid(row=0, column=3)
  28. # 组合方式选择框
  29. ttk.Label(root, text=”组合方式:”).grid(row=2, column=0)
  30. combo = ttk.Combobox(root, values=[
  31.     “关键词1 + 关键词2”,
  32.     “关键词1 + 关键词3”,
  33.     “关键词2 + 关键词3”,
  34.     “关键词1 + 关键词2 + 关键词3”
  35. ], state=”readonly”, width=20)
  36. combo.grid(row=2, column=1, padx=5)
  37. combo.current(3)  # 默认选择全组合
  38. ls = []
  39. def on_date_selected():
  40.     # 清空结果
  41.     ls.clear()
  42.     t3.delete(‘1.0’, tk.END)
  43.     # 获取文本框内容
  44.     contents = [
  45.         t.get(“1.0”, tk.END).split(‘\n’),
  46.         t1.get(“1.0”, tk.END).split(‘\n’),
  47.         t2.get(“1.0”, tk.END).split(‘\n’)
  48.     ]
  49.     # 清洗和过滤空内容
  50.     lines_list = [
  51.         [line.strip() for line in content if line.strip()]
  52.         for content in contents
  53.     ]
  54.     # 获取组合方式
  55.     combination_map = {
  56.         “关键词1 + 关键词2”: [0, 1],
  57.         “关键词1 + 关键词3”: [0, 2],
  58.         “关键词2 + 关键词3”: [1, 2],
  59.         “关键词1 + 关键词2 + 关键词3”: [0, 1, 2]
  60.     }
  61.     selected = combo.get()
  62.     indices = combination_map.get(selected, [0, 1, 2])
  63.     # 生成组合
  64.     try:
  65.         for parts in itertools.product(*[lines_list[i] for i in indices]):
  66.             combined = ”.join(parts)
  67.             ls.append(combined)
  68.             t3.insert(‘end’, combined + ‘\n’)
  69.     except IndexError:
  70.         showerror(“错误”, “无效的组合选项”)
  71. def clear_text():
  72.     for widget in [t, t1, t2, t3]:
  73.         widget.delete(‘1.0’, ‘end’)
  74. def paste_text(text_widget):
  75.     text_widget.event_generate(‘<<Paste>>’)
  76. def copy_text(widget):
  77.     try:
  78.         text = widget.selection_get()
  79.         root.clipboard_clear()
  80.         root.clipboard_append(text)
  81.     except tk.TclError:
  82.         showerror(“错误”, “没有选中的内容”)
  83. # 右键菜单功能
  84. def create_menu(text_widget, event):
  85.     menu = tk.Menu(text_widget, tearoff=False)
  86.     menu.add_command(label=’粘贴’, command=lambda: paste_text(text_widget))
  87.     menu.add_command(label=’复制’, command=lambda: copy_text(text_widget))
  88.     menu.tk_popup(event.x_root, event.y_root)
  89. # 绑定右键菜单
  90. for widget in [t, t1, t2, t3]:
  91.     widget.bind(‘<Button-3>’, lambda event, w=widget: create_menu(w, event))
  92. # 操作按钮
  93. tk.Button(root, text=”点击组合”, command=on_date_selected, width=18).grid(row=2, column=2)
  94. tk.Button(root, text=”点击清除”, command=clear_text, width=18).grid(row=2, column=3)
  95. root.mainloop()
复制代码

 

该资源来源于WordPress主站,点击下方按钮前往原文页面获取完整内容:

跳转至 WordPress 主站原文页面

声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。