Bienvenido a Tecnohackers

Tecnohackers » Programacion » Area de Programacion » Scripting. VBS, Batch, Bash, JavaSript.
 » 

[Python] Buscador de sueños 0.1



Autor Tema: [Python] Buscador de sueños 0.1  (Leído 716 veces)

Desconectado Doddy

  • Veterano
  • ***
  • Mensajes: 249
  • Slow Mind
[Python] Buscador de sueños 0.1
« en: Abril 04, 2012, 06:35:16 pm »
Un simple buscador de sueños hecho en Python.

Código: You are not allowed to view links. Register or Login
#!usr/bin/python
#coding: utf-8
#Buscador de sueños 0.1
#Coded By Doddy H

import urllib2,re,sys

def toma(web) :
 nave = urllib2.Request(web)
 nave.add_header('User-Agent','Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.5) Gecko/2008120122 Firefox/3.0.5');
 op = urllib2.build_opener()
 return op.open(nave).read()

def head():
  print "\n-- == Buscador de sueños == --\n"

def copyright():
 print "\n\n(C) Doddy Hackman 2012\n"
 raw_input()
 sys.exit(1)

head()

url = raw_input("\n\n[+] Texto : ")

try:
 code = toma("http://www.mis-suenos.org/interpretaciones/buscar?text="+url)
 if (re.findall("<li>(.*)<\/li>",code)):
   re = re.findall("<li>(.*)<\/li>",code)
   re = re[0]
   if not re=="":
     print "\n\n[+] Significado : "+re
   else:
     print "[-] No se encontro significado\n"
except:
 print "[-] Error\n"
 
copyright()

# The End
You are not allowed to view links. Register or Login

Tags:
Tags:

 


SMF 2.0.19 | SMF © 2016, Simple Machines
Paginas Afiliadas
Twitter - FaceBook - Daraxblog
Designed by Smf Personal