Skip to content

Instantly share code, notes, and snippets.

@akobashikawa
Created August 17, 2015 20:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save akobashikawa/49a089cb0460137ee76d to your computer and use it in GitHub Desktop.
Save akobashikawa/49a089cb0460137ee76d to your computer and use it in GitHub Desktop.
Obteniendo el tipo de cambio desde la web de "El peruano"
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Tipo de Cambio</title>
</head>
<body>
<h1>Tipo de Cambio</h1>
<p id="result">Cargando...</p>
<p><small>Tomado de: http://www.elperuano.com.pe/edicion/</small></p>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
<script>
$(document).on('ready', function() {
$.get('http://crossorigin.me/http://www.elperuano.com.pe/edicion/')
.then(function(data) {
var $html = $(data);
var result = $html.find('#clima .tex12normal').text();
$('#result').html(result);
});
});
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment