# Tool to check if name is taken

**URL:** <https://forum.spyhub.tv/t/tool-to-check-if-name-is-taken/27204>\
**Category:** General Discussion\
**Created:** [February 4, 2023, 12:41am UTC](https://forum.spyhub.tv/t/tool-to-check-if-name-is-taken/27204 "2023-02-04T00:41:37Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![jabbath1987](https://forum-cdn.spyhub.tv/user_avatar/forum.spyhub.tv/jabbath1987/32/727042_2.png) [@jabbath1987](https://forum.spyhub.tv/u/jabbath1987)\
**Post date:** [February 4, 2023, 12:41am UTC](https://forum.spyhub.tv/t/tool-to-check-if-name-is-taken/27204/1 "2023-02-04T00:41:37Z")

</div>

Who does not know the situation when you want to name a new guest, but you are not sure if the name is already taken?  
Now I have a solution. It is very simple and tells you immediately if the name is taken or not.

**A new version of the script which works with the new archives can be found here:**  
**[Tool to check if name is taken - #31 by jabbath1987](https://forum.spyhub.tv/t/tool-to-check-if-name-is-taken/27204/31)**

> **Deprecated**
>
> Unfortunately I can’t upload any scripts here, so the best thing is to copy my little code snippet and you’re all set:
> 
> 1. Create a new file and name it CheckNames.ps1. It is important to use the extension **.ps1**.
> 2. Open the file with a text editor, copy and paste my code below and save it.
> 3. Right click and choose _Run with PowerShell_.
> 4. Currently only works on Windows. I also have a Python version of this that is OS agnostic. If you prefer that, just PM me.
> 
> ```auto
> $webClient = New-Object System.Net.WebClient
> 
> do
> {
> Write-Host "Enter a name to check:"
> $name = Read-Host
> 
> $html = $webClient.DownloadString("https://voyeur-house.tv/moments")
> 
> if ($html -match $name)
> {
> Write-Host "Name taken"
> }
> else
> {
> Write-Host "Name available"
> }
> 
> Write-Host "Do you want to search for another name? (y/n)"
> $continue = Read-Host
> } while ($continue -eq "y")
> 
> ```

---

<div class="post-metadata">

**Author:** ![Sparkles](https://forum-cdn.spyhub.tv/user_avatar/forum.spyhub.tv/sparkles/32/59209_2.png) [@Sparkles](https://forum.spyhub.tv/u/Sparkles)\
**Post date:** [February 4, 2023, 1:11am UTC](https://forum.spyhub.tv/t/tool-to-check-if-name-is-taken/27204/2 "2023-02-04T01:11:01Z")

</div>

That’s seems too nerdie! 😁

I use this (and it’s also helpful to see possible name derivations)

---

<div class="post-metadata">

**Author:** ![jabbath1987](https://forum-cdn.spyhub.tv/user_avatar/forum.spyhub.tv/jabbath1987/32/727042_2.png) [@jabbath1987](https://forum.spyhub.tv/u/jabbath1987)\
**Post date:** [February 4, 2023, 1:11am UTC](https://forum.spyhub.tv/t/tool-to-check-if-name-is-taken/27204/3 "2023-02-04T01:11:59Z")

</div>

I used that before. But my tool is the faster one 😂 😇

---

<div class="post-metadata">

**Author:** ![jabbath1987](https://forum-cdn.spyhub.tv/user_avatar/forum.spyhub.tv/jabbath1987/32/727042_2.png) [@jabbath1987](https://forum.spyhub.tv/u/jabbath1987)\
**Post date:** [February 4, 2023, 2:41am UTC](https://forum.spyhub.tv/t/tool-to-check-if-name-is-taken/27204/5 "2023-02-04T02:41:20Z")

</div>

Try to run it from a powershell window and tell the error you get.

---

<div class="post-metadata">

**Author:** ![jabbath1987](https://forum-cdn.spyhub.tv/user_avatar/forum.spyhub.tv/jabbath1987/32/727042_2.png) [@jabbath1987](https://forum.spyhub.tv/u/jabbath1987)\
**Post date:** [February 4, 2023, 2:56am UTC](https://forum.spyhub.tv/t/tool-to-check-if-name-is-taken/27204/7 "2023-02-04T02:56:36Z")

</div>

This is strange. Maybe your path variables are not properly set up?  
**A new version of the script which works with the new archives can be found here:**  
**[Tool to check if name is taken - #31 by jabbath1987](https://forum.spyhub.tv/t/tool-to-check-if-name-is-taken/27204/31)**

> **Deprecated**
>
> I can give you the script as Python when you want? You need to have Python installed to use it of course… Do everything like above. Just save it as CheckNames. **py**
> 
> ```auto
> while True:
> name = input("Enter a name to check:")
> 
> try:
> import urllib.request
> with urllib.request.urlopen("https://voyeur-house.tv/moments") as response:
> html = response.read().decode('utf-8')
> 
> if name in html:
> print("Name taken")
> else:
> print("Name available")
> 
> except Exception as e:
> print("An error occurred:", str(e))
> 
> choice = input("Do you want to search for another name? (y/n)")
> if choice.lower() != 'y':
> break
> 
> ```

---

<div class="post-metadata">

**Author:** ![jabbath1987](https://forum-cdn.spyhub.tv/user_avatar/forum.spyhub.tv/jabbath1987/32/727042_2.png) [@jabbath1987](https://forum.spyhub.tv/u/jabbath1987)\
**Post date:** [February 4, 2023, 3:27am UTC](https://forum.spyhub.tv/t/tool-to-check-if-name-is-taken/27204/9 "2023-02-04T03:27:53Z")

</div>

I noticed you used the cmd shell to try and run it. Please try to open Powershell as Admin and navigate where you have the script and then try to open it. You should at least get an error

---

<div class="post-metadata">

**Author:** ![jabbath1987](https://forum-cdn.spyhub.tv/user_avatar/forum.spyhub.tv/jabbath1987/32/727042_2.png) [@jabbath1987](https://forum.spyhub.tv/u/jabbath1987)\
**Post date:** [February 4, 2023, 3:38am UTC](https://forum.spyhub.tv/t/tool-to-check-if-name-is-taken/27204/11 "2023-02-04T03:38:46Z")

</div>

Ah we can fix that easily 😉

Open power Shell as Admin and enter the following and press _J_

**Set-ExecutionPolicy RemoteSigned**

---

<div class="post-metadata">

**Author:** ![Sparkles](https://forum-cdn.spyhub.tv/user_avatar/forum.spyhub.tv/sparkles/32/59209_2.png) [@Sparkles](https://forum.spyhub.tv/u/Sparkles)\
**Post date:** [February 4, 2023, 3:44am UTC](https://forum.spyhub.tv/t/tool-to-check-if-name-is-taken/27204/12 "2023-02-04T03:44:52Z")

</div>

> [@jabbath1987](#):
>
> Ah we can fix that easily 😉

Indeed it can.. Just check post nº2 🤣 🤣

---

<div class="post-metadata">

**Author:** ![jabbath1987](https://forum-cdn.spyhub.tv/user_avatar/forum.spyhub.tv/jabbath1987/32/727042_2.png) [@jabbath1987](https://forum.spyhub.tv/u/jabbath1987)\
**Post date:** [February 4, 2023, 3:47am UTC](https://forum.spyhub.tv/t/tool-to-check-if-name-is-taken/27204/13 "2023-02-04T03:47:07Z")

</div>

😂  
 ![Tom And Jerry Reaction GIF](https://media0.giphy.com/media/6BZaFXBVPBtok/giphy.webp?cid=e62a454d3z85m1cdwe73zig7x1szqe23gv329i5v4g440a3q&rid=giphy.webp&ct=g)

---

<div class="post-metadata">

**Author:** ![jabbath1987](https://forum-cdn.spyhub.tv/user_avatar/forum.spyhub.tv/jabbath1987/32/727042_2.png) [@jabbath1987](https://forum.spyhub.tv/u/jabbath1987)\
**Post date:** [February 4, 2023, 4:10am UTC](https://forum.spyhub.tv/t/tool-to-check-if-name-is-taken/27204/15 "2023-02-04T04:10:51Z")

</div>

Should now work with double click on it too when you associated the .ps1 extension with Windows PowerShell 😉

---

<div class="post-metadata">

**Author:** ![Sarahhh](https://forum-cdn.spyhub.tv/user_avatar/forum.spyhub.tv/sarahhh/32/210829_2.png) [@Sarahhh](https://forum.spyhub.tv/u/Sarahhh)\
**Post date:** [February 4, 2023, 12:42pm UTC](https://forum.spyhub.tv/t/tool-to-check-if-name-is-taken/27204/17 "2023-02-04T12:42:10Z")

</div>

Thanks for the code add. Do you happen to work and IT too?

---

<div class="post-metadata">

**Author:** ![jabbath1987](https://forum-cdn.spyhub.tv/user_avatar/forum.spyhub.tv/jabbath1987/32/727042_2.png) [@jabbath1987](https://forum.spyhub.tv/u/jabbath1987)\
**Post date:** [February 4, 2023, 4:08pm UTC](https://forum.spyhub.tv/t/tool-to-check-if-name-is-taken/27204/18 "2023-02-04T16:08:42Z")

</div>

> [@Sarahhh](#):
>
> Do you happen to work and IT too?

Yes I do. 😉

---

<div class="post-metadata">

**Author:** ![letsdothis](https://forum-cdn.spyhub.tv/user_avatar/forum.spyhub.tv/letsdothis/32/63487_2.png) [@letsdothis](https://forum.spyhub.tv/u/letsdothis)\
**Post date:** [January 22, 2025, 10:03am UTC](https://forum.spyhub.tv/t/tool-to-check-if-name-is-taken/27204/19 "2025-01-22T10:03:48Z")

</div>

> [@jabbath1987](#):
>
> Currently only works on Windows. I also have a Python version of this that is **OS agnostic.** If you prefer that, just PM me.

Does this mean it works in Android?

---

<div class="post-metadata">

**Author:** ![jabbath1987](https://forum-cdn.spyhub.tv/user_avatar/forum.spyhub.tv/jabbath1987/32/727042_2.png) [@jabbath1987](https://forum.spyhub.tv/u/jabbath1987)\
**Post date:** [January 22, 2025, 10:38am UTC](https://forum.spyhub.tv/t/tool-to-check-if-name-is-taken/27204/20 "2025-01-22T10:38:06Z")

</div>

Yes. You just need to install a Python environment  
I use **QPython3**

> <https://play.google.com/store/apps/details?id=org.qpython.qpy3&hl=en>
>
> QPython3 is mainly for experienced Python users...

---

<div class="post-metadata">

**Author:** ![letsdothis](https://forum-cdn.spyhub.tv/user_avatar/forum.spyhub.tv/letsdothis/32/63487_2.png) [@letsdothis](https://forum.spyhub.tv/u/letsdothis)\
**Post date:** [January 22, 2025, 2:11pm UTC](https://forum.spyhub.tv/t/tool-to-check-if-name-is-taken/27204/21 "2025-01-22T14:11:02Z")

</div>

> [@jabbath1987](#):
>
> You just need to install a Python environment

Gotcha. But as I understand it, neither of your scripts work at the moment. Is that right?

---

<div class="post-metadata">

**Author:** ![jabbath1987](https://forum-cdn.spyhub.tv/user_avatar/forum.spyhub.tv/jabbath1987/32/727042_2.png) [@jabbath1987](https://forum.spyhub.tv/u/jabbath1987)\
**Post date:** [January 22, 2025, 2:12pm UTC](https://forum.spyhub.tv/t/tool-to-check-if-name-is-taken/27204/22 "2025-01-22T14:12:47Z")

</div>

It still works. As long as VHTV does not take down the old archives. I am already working on a new one. But for now it works.

---

<div class="post-metadata">

**Author:** ![letsdothis](https://forum-cdn.spyhub.tv/user_avatar/forum.spyhub.tv/letsdothis/32/63487_2.png) [@letsdothis](https://forum.spyhub.tv/u/letsdothis)\
**Post date:** [January 22, 2025, 2:16pm UTC](https://forum.spyhub.tv/t/tool-to-check-if-name-is-taken/27204/23 "2025-01-22T14:16:01Z")

</div>

> [@jabbath1987](#):
>
> As long as VHTV does not take down the old archives.

Good. Can you post the one for Android. Thanks.

---

<div class="post-metadata">

**Author:** ![jabbath1987](https://forum-cdn.spyhub.tv/user_avatar/forum.spyhub.tv/jabbath1987/32/727042_2.png) [@jabbath1987](https://forum.spyhub.tv/u/jabbath1987)\
**Post date:** [January 22, 2025, 2:16pm UTC](https://forum.spyhub.tv/t/tool-to-check-if-name-is-taken/27204/24 "2025-01-22T14:16:40Z")

</div>

> [@Tool to check if name is taken](https://forum.spyhub.tv/t/tool-to-check-if-name-is-taken/27204/7):
>
> This is strange. Maybe your path variables are not properly set up? A new version of the script which works with the new archives can be found here: [Tool to check if name is taken - #31 by jabbath1987](https://forum.spyhub.tv/t/tool-to-check-if-name-is-taken/27204/31)play_button Deprecated

---

<div class="post-metadata">

**Author:** ![letsdothis](https://forum-cdn.spyhub.tv/user_avatar/forum.spyhub.tv/letsdothis/32/63487_2.png) [@letsdothis](https://forum.spyhub.tv/u/letsdothis)\
**Post date:** [January 22, 2025, 3:25pm UTC](https://forum.spyhub.tv/t/tool-to-check-if-name-is-taken/27204/25 "2025-01-22T15:25:08Z")

</div>

I don’t know the first thing about scripts, or Python, etc. This is how I see the script you posted when it’s on my screen.

 ![XRecorder_22012025_094747_Edited](https://forum-cdn.spyhub.tv/uploads/default/original/4X/c/a/6/ca689bf91ad5ae09784fe4daee2ce83def49efd7.jpeg)

So, I just highlighted everything from while true down to break and copied and pasted it into a file called namecheck.py. This is how it looks in the file.

while True:  
name = input(“Enter a name to check:”)

```
try:
    import urllib.request
    with urllib.request.urlopen("https://voyeur-house.tv/moments") as response:
        html = response.read().decode('utf-8')

    if name in html:
        print("Name taken")
    else:
        print("Name available")

except Exception as e:
    print("An error occurred:", str(e))

choice = input("Do you want to search for another name? (y/n)")
if choice.lower() != 'y':
    break

```

Did I get everything, is it formatted correctly? There are no colors. Does that make a difference?

I installed QPython3. Do I open that and run the script within that environment, or is there something else I need to do? When I run it can I enter the name after the file name, or do I have to wait for it to ask me for a name? Thanks for your help.

---

<div class="post-metadata">

**Author:** ![jabbath1987](https://forum-cdn.spyhub.tv/user_avatar/forum.spyhub.tv/jabbath1987/32/727042_2.png) [@jabbath1987](https://forum.spyhub.tv/u/jabbath1987)\
**Post date:** [January 22, 2025, 5:12pm UTC](https://forum.spyhub.tv/t/tool-to-check-if-name-is-taken/27204/26 "2025-01-22T17:12:53Z")

</div>

> [@letsdothis](#):
>
> I installed QPython3. Do I open that and run the script within that environment,

Yes exactly. I will show how it is done. Wait

[Next page](https://forum.spyhub.tv/t/tool-to-check-if-name-is-taken/27204.md?page=2)
