From fded79b2d0fea824362c67ba5f56be282c6683dc Mon Sep 17 00:00:00 2001 From: DiegoCaraballo Date: Wed, 7 Feb 2018 15:13:19 -0300 Subject: [PATCH] Comienzo a armar menu --- EmailExtractor.py | 52 +++++++++++++++++++++++++++++++++++++++++++++++ Extractor.py | 3 --- 2 files changed, 52 insertions(+), 3 deletions(-) create mode 100644 EmailExtractor.py delete mode 100644 Extractor.py diff --git a/EmailExtractor.py b/EmailExtractor.py new file mode 100644 index 0000000..fb4c3aa --- /dev/null +++ b/EmailExtractor.py @@ -0,0 +1,52 @@ + +#!/usr/bin/python +# -*- coding: utf-8 -*- + +#query : query string that we want to search for. +#tld : tld stands for top level domain which means we want to search our result on google.com or google.in or some other domain. +#lang : lang stands for language. +#num : Number of results we want. +#start : First result to retrieve. +#stop : Last result to retrieve. Use None to keep searching forever. +#pause : Lapse to wait between HTTP requests. Lapse too short may cause Google to block your IP. Keeping significant lapse will make your program slow but its safe and better option. +#Return : Generator (iterator) that yields found URLs. If the stop parameter is None the iterator will loop forever. + +#from google import search +import random +import os +import time + +# to search +query = "Geeksforgeeks" +p = random.randrange(2,6) + +#for j in search(query, tld="co.in", num=10, stop=1, pause=p): +# print(j) + + +def menu(): + try: + opcion = input("Ingreso Opcion: ") + if (opcion == "1"): + print ("Soy el 1") + elif (opcion == "2"): + print ("Soy el 2") + else: + print ("Seleccione un opcion correcta") + time.sleep(2) + clear() + menu() + + except: + "Error en funcion Menu" + +# Limpia la pantalla segĂșn el sistema operativo +def clear(): + if os.name == "posix": + os.system("clear") + elif os.name == "ce" or os.name == "nt" or os.name == "dos": + os.system("cls") + + +# Inicio de Programa +menu() diff --git a/Extractor.py b/Extractor.py deleted file mode 100644 index 5a706b9..0000000 --- a/Extractor.py +++ /dev/null @@ -1,3 +0,0 @@ - -#!/usr/bin/python -# -*- coding: utf-8 -*- \ No newline at end of file