Skip to content

Instantly share code, notes, and snippets.

@KaushikShresth07
Last active March 11, 2025 05:42
Show Gist options
  • Save KaushikShresth07/787be8b136fd90c84d2ab0c38fcede0b to your computer and use it in GitHub Desktop.
Save KaushikShresth07/787be8b136fd90c84d2ab0c38fcede0b to your computer and use it in GitHub Desktop.
# pip install webdriver_manager
# pip install selenium
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
from time import sleep
from selenium.webdriver.common.by import By
from selenium.webdriver.chrome.service import Service
from selenium.webdriver.chrome.options import Options
from webdriver_manager.chrome import ChromeDriverManager
Link = r"C:\Users\mrmil\OneDrive\Desktop\Jarvis4YouTube\voice.html"
chrome_options = Options()
user_agent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.142.86 Safari/537.36"
chrome_options.add_argument(f'user-agent={user_agent}')
chrome_options.add_argument("--use-fake-ui-for-media-stream")
chrome_options.add_argument("--use-fake-device-for-media-stream")
chrome_options.add_argument("--headless=new")
service = Service(ChromeDriverManager().install())
driver = webdriver.Chrome(service=service, options=chrome_options)
driver.get(Link)
def SpeechRecognitionModel():
driver.find_element(by=By.ID,value="start").click()
print("Listening...")
while True:
try:
Text = driver.find_element(by=By.ID,value="output").text
if Text:
driver.find_element(by=By.ID,value="end").click()
return Text
else:
sleep(0.333)
except:
pass
@kbbyb
Copy link

kbbyb commented Mar 31, 2024

please tell us what Extension you use in vs code

@DhanushGN
Copy link

bro in my pc when i it run it will run but within a second it will closed what is the problem

@DhruvKadam5911
Copy link

please tell us what Extension you use in vs code

Live Preview

@Raulo07
Copy link

Raulo07 commented Apr 17, 2024

please tell us what Extension you use in vs code

bro he uses codeium and yo can also use blackbox and github copilot

@mrminihacker
Copy link

please tell us what Extension you use in vs code

.py extension is used

@deveshyad
Copy link

pip : The term 'pip' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a
path was included, verify that the path is correct and try again.
At line:1 char:1

  • pip install webdriver_manager
  •   + CategoryInfo          : ObjectNotFound: (pip:String) [], CommandNotFoundException
      + FullyQualifiedErrorId : CommandNotFoundException
    

anybody knows what it is

@sojanonelson
Copy link

pip : The term 'pip' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. At line:1 char:1

  • pip install webdriver_manager
  •   + CategoryInfo          : ObjectNotFound: (pip:String) [], CommandNotFoundException
      + FullyQualifiedErrorId : CommandNotFoundException
    

anybody knows what it is

Bro, actually the package named pip is required for installing modules. Download the get-pip.py file (you can use this link: ) and run the file using the command python get-pip.py and your restart pc
Hope that helps :)

@dangerlover-ui
Copy link

pip : The term 'pip' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. At line:1 char:1

  • pip install webdriver_manager
  •   + CategoryInfo          : ObjectNotFound: (pip:String) [], CommandNotFoundException
      + FullyQualifiedErrorId : CommandNotFoundException
    

anybody knows what it is

Hello Read this "Ye error is wajah se aa raha hai ke pip aapke system par properly install nahi hai ya phir uska path Windows environment variables mein set nahi hai. Aap isko fix karne ke liye ye steps follow karein:

Solution 1: Check if Python and pip are installed
Command Prompt (CMD) open karein aur ye command run karein:

css
Copy
Edit
python --version
Agar Python installed hai, to version number show hoga (e.g., Python 3.10.5).

pip check karne ke liye ye command run karein:

css
Copy
Edit
pip --version
Agar ye bhi error de raha hai, to pip install nahi hai ya phir uska path set nahi hai.

Solution 2: Install pip manually
Agar pip installed nahi hai, to aap isko manually install kar sakte hain:

CMD open karein aur ye command run karein:
cpp
Copy
Edit
python -m ensurepip --default-pip
Phir pip update karein:
css
Copy
Edit
python -m pip install --upgrade pip
Dobara check karein:
css
Copy
Edit
pip --version
Solution 3: Add Python to System Path
Agar pip installed hai magar recognize nahi ho raha, to Python ka path environment variables mein set karein:

Windows Search mein "Environment Variables" likhein aur "Edit the system environment variables" open karein.

Advanced tab par click karein aur Environment Variables button par click karein.

System variables mein "Path" select karein aur Edit par click karein.

New button par click karein aur Python aur pip ka path add karein:

makefile
Copy
Edit
C:\Users\YourUsername\AppData\Local\Programs\Python\PythonXX\Scripts
C:\Users\YourUsername\AppData\Local\Programs\Python\PythonXX
(XX ko apne installed Python version se replace karein)

OK karein aur CMD dobara open karke ye command run karein:

css
Copy
Edit
pip --version
Agar sab kuch sahi ho gaya, to pip install webdriver_manager command dobara run karein:

nginx
Copy
Edit
pip install webdriver_manager "

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment