Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
page = br.open("http://example.com") | |
# page tiene el resultado de la request | |
html_source_code = page.read() # br esta ahora en example.com | |
#=== Interactuando con los formularios | |
br.select_form(name="form-name") # si la forma tiene name | |
# si no tiene el tag "name", hay que buscar la forma por su | |
# indice en el codigo de la pagina | |
br.form = list(br.forms())[0] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import mechanize | |
from mechanize import Browser | |
br = Browser() | |
# browser basic setup (for simulate a real web browser) | |
br.set_handle_equiv(True) # cuando tratar HTML http-equiv headers como HTTP headers | |
br.set_handle_redirect(True) # para los redirect loops | |
br.set_handle_referer(True) # para annadir un referer al objeto request | |
br.set_handle_robots(False) # ignorar robots.txt | |
br.set_debug_http(False) # bueno para la fase de development |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ bin/plugin --install com.github.richardwilly98.elasticsearch/elasticsearch-river-mongodb/1.6.0 | |
$ bin/plugin --install elasticsearch/elasticsearch-mapper-attachments/1.6.0 | |
$ bin/plugin --install mobz/elasticsearch-head | |
$ bin/plugin --install lukas-vlcek/bigdesk |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl -XPUT 'http://localhost:9200/_river/mongodb/_meta' -d '{ | |
"type": "mongodb", | |
"mongodb": { | |
"servers": [ { "host": "127.0.0.1", "port": 27017 } ], | |
"db": "nombre_base_prueba", | |
"collection": "nombre_coleccion_prueba" | |
}, | |
"index": { | |
"name": "nombre_indice_prueba", | |
"type": "tipo_prueba" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"took" : 4, | |
"timed_out" : false, | |
"_shards" : { | |
"total" : 5, | |
"successful" : 5, | |
"failed" : 0 | |
}, | |
"hits" : { | |
"total" : 100, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fastcgi.server = ( | |
"/myapp" => ( | |
"django-fcgi" => ( | |
"socket" => "/route/to/socket_file.sock", | |
"check-local" => "disable", | |
) | |
), | |
) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fastcgi.server = ( | |
"/myapp" => ( | |
"django-fcgi" => ( | |
"socket" => "/route/to/socket_file.sock", | |
"check-local" => "disable", | |
) | |
), | |
) | |
alias.url = ( | |
# en caso de que lo necesiten |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Usando tweepy para obetener la red de seguidores de nivel k de un sujeto en twitter. | |
# Created by Ricardo Mansilla at November 6, 2011. | |
#===================================================================================== | |
import sys | |
import tweepy | |
import webbrowser | |
import time | |
#======= SETUP =========== |