Answers for "Search bar using python"

0

Search bar using python

#Open website
import os
import time
import webbrowser
import sys

os.system('clear')
print("Hi i am Like Google but a bit crazy one")
Name = input("So what should i call you: ")
print("Hi", Name, "my name is Seainte")
print("So what would you like to search for topics will be given\nGames\nYoutube\nInternet\nCoding")
Search = input("Enter your topic here: ")

#Search variable input games Done
if Search == 'Games' or Search == 'games':
    os.system('clear')    
    print("The topics are:\nFlying\nSandbox\nRealistic")
    Games_Search = input("Enter your topic here: ")
    if Games_Search == 'Flying' or Games_Search == 'flying':
        print("Loading...")
        time.sleep(5)
        webbrowser.open('https://www.geo-fs.com/geofs.php', True)
    elif Games_Search == 'Sandbox' or Games_Search == 'sandbox':
        print("Loading...")
        time.sleep(5)
        webbrowser.open('https://www.minecraft.net/en-us/', True)
    elif Games_Search == 'Realistic' or Games_Search == 'realistic':
        print("Loading...")
        time.sleep(5)
        webbrowser.open('https://mypcgames.net/gta-5-download-for-pc/', True)
    else:
        print("Wrong input or topic please enter the correct topic/input next time", Name)
#Search variable input youtube Done
elif Search == 'Youtube' or Search == 'youtube':
    os.system('clear')    
    print("So the topics are:\nComedy\nGaming\nLearning\nSongs")
    Youtube_Search = input("Enter your topic: ")
    if Youtube_Search == 'Comedy' or Youtube_Search == 'comedy':
        print("Laoding...")
        time.sleep(5)
        webbrowser.open('https://www.youtube.com/watch?v=J-zn8PdvZOU&t=16s&ab_channel=ashishchanchlanivines', True)
    elif Youtube_Search == 'Gaming' or Youtube_Search == 'gaming':
        print("Loading...")
        time.sleep(5)
        webbrowser.open('https://www.youtube.com/gaming', True)
    elif Youtube_Search == 'Learning' or Youtube_Search == 'learning':
        print("Loading...")
        time.sleep('https://www.youtube.com/results?search_query=learning', True)
    elif Youtube_Search == 'Songs' or Youtube_Search == 'songs':
        print("Loading...")
        time.sleep(5)
        webbrowser.open('https://www.youtube.com/results?search_query=english+songs', True)
    else:
        print("Wrong topic please enter the correct topic next time", Name)
#This is for Search variable Internet input Done
elif Search == 'Internet' or Search == 'internet':
    os.system('clear')    
    print("So the topics are:\nSearch\nLearn\nplay games online\nDownload stuff")
    Internet_Search = input("Enter your topic: ")
    if Internet_Search == 'Search' or Internet_Search == 'search':
        print("Loading...")
        time.sleep(5)
        webbrowser.open('https://www.google.com/', True)
    elif Internet_Search == 'learn' or Internet_Search == 'Learn':
        print("Loading...")
        time.sleep(5)
        webbrowser.open('https://www.youtube.com/watch?v=8I7iboAG4gE&ab_channel=ADSRMusicProductionTutorials', True)
    elif Internet_Search == 'Play games online' or Internet_Search == 'play games online':
        print("Loading...")
        time.sleep(5)
        webbrowser.open('crazygames.com', True)
    elif Internet_Search == 'Download stuff' or Internet_Search == 'download stuff':
        print("Loading...")
        time.sleep(5)
        webbrowser.open('https://tlauncher.org/en/', True)
    else:
        print("Wrong topic please enter the correct topic next time", Name)
#This is for Search input from Search variable Done
elif Search == 'Coding' or Search == 'coding':
    os.system('clear')    
    print("So the topics are:\nPython\nC\nC#\nJavascript")
    Coding_Search = input("Enter your topic: ")
    if Coding_Search == 'Python' or Coding_Search == 'python':
        print("Loading...")
        time.sleep(5)
        webbrowser.open('https://www.programiz.com/python-programming', True)
    elif Coding_Search == 'C' or Coding_Search == 'c':
        print("Loading...")
        time.sleep(5)
        webbrowser.open('https://www.programiz.com/c-programming', True)
    elif Coding_Search == 'C#' or Coding_Search == 'c#':
        print("Loading...")
        time.sleep(5)
        webbrowser('https://www.programiz.com/csharp-programming', True)
    elif Coding_Search == 'Javascript' or Coding_Search == 'javascript':
        print("Loading...")
        time.sleep(5)
        webbrowser.open('https://www.programiz.com/javascript', True)
    else:
        print("Wrong topic please enter the correct topic next time", Name)
Posted by: Guest on February-19-2021

Python Answers by Framework

Browse Popular Code Answers by Language