El siguiente mini-tutorial muestra cómo usar la API de Bootic usando la herramienta [curl][curl].
Antes de nada es preciso crear una aplicación y generar un access token, los siguiente pasos lo ilustran:
| <!doctype html> | |
| <html lang="es"> | |
| <head> | |
| <title>{% current_title %} - {{ shop.name }}</title> | |
| {% bootic_header 'v2' %}<!-- carga bootic.css y shops.js --> | |
| {% include_optional 'custom_head.html' %} | |
| {% include_optional 'custom.css' %} | |
| </head> | |
| <body> | |
| {% render_header %}<!-- carga before_header.html y after_header.html en caso de que existan --> |
| require 'http' | |
| require 'nokogiri' | |
| url = "https://www.rae.es/noticia/las-palabras-del-ano-en-el-universo-hispanohablante" | |
| content = HTTP.follow.get url | |
| doc = Nokogiri::HTML content.to_s | |
| rae2020 = doc.css('.bloque-texto a[target="_blank"]') | |
| puts rae2020.select { |x| x.parent.children.count < 2} | |
| .each {|x| x.content }.join(" / ") |
| ### Respuesta Transbank | |
| `vci` (String) | |
| Puede tomar el valor | |
| * TSY (Autenticación exitosa), | |
| * TSN (Autenticación fallida), | |
| * TO (Tiempo máximo excedido para autenticación), |
| https://dafirenze.cl/collections/sale?utm_source=ccs&utm_medium=logo&utm_campaign=cyber_oct ['vestuario'] | |
| https://www.mercadolibre.cl/cyber-monday ['multitiendas'] | |
| https://www.japijane.cl/ ['salud'] | |
| https://www.todopiel.cl/ ['vestuario'] | |
| https://www.sodimac.cl/sodimac-cl/?sid=bnnext150064&disp=OTROS-MEDIOS ['hogar'] | |
| https://www.mitiendacotidian.cl/cybermonday ['salud'] | |
| http://bit.ly/2nNkaTq ['salud'] | |
| https://www.carterasecret.cl/?utm_source=cyberoct&utm_medium=referal&utm_campaign=cyber_octubre_2019&utm_content=cyber ['accesorios'] | |
| https://www.a3d.cl/?prx=ccs ['multitiendas'] | |
| https://www.eliteperfumes.cl/ ['salud'] |
| from bs4 import BeautifulSoup | |
| import os | |
| import urllib.request | |
| file = open("t.tmp") | |
| content = file.read() | |
| soup = BeautifulSoup(content,'html.parser') |
| .sass-cache | |
| *css.map |
| [ | |
| { | |
| "description": "Silla visita asiento y respaldo pl\u00e1stico de color. Estructura de tubo redondo acanalado negro, aluminio y cromado. Opcionalmente con brazos.\nAncho: 48 cm\nLargo: 41 cm\nAltura: 79 cm\nAltura asiento: 47 cm\nColores:\u00a0Azul / Gris / Negro / Naranja / Arena / Verde / Blanco\nMaterial: Metal y polipropileno\nApilable: S\u00ed\nC\u00f3digo Producto: ASE-004", | |
| "name": "Silla Palmate", | |
| "photos": [ | |
| { | |
| "name": "Silla-Fin.jpg" | |
| }, | |
| { | |
| "name": "Silla-Palmate-Brazos.jpg" |
Graphic via State of Florida CFO Vendor Payment Search (flair.myfloridacfo.com)
This is a quick command I use to snapshot webpages that have a fun image I want to keep for my own collection of WTFViz. Why not just right-click and save the image? Oftentimes, the webpage in which the image is embedded contains necessary context, such as captions and links to important documentation just incase you forget what exactly that fun graphic was trying to explain.
| <?php | |
| define('MAILGUN_URL', 'https://api.mailgun.net/v3/DOMAIN_NAME'); | |
| define('MAILGUN_KEY', 'KEY'); | |
| function sendmailbymailgun($to,$toname,$mailfromnane,$mailfrom,$subject,$html,$text,$tag,$replyto){ | |
| $array_data = array( | |
| 'from'=> $mailfromname .'<'.$mailfrom.'>', | |
| 'to'=>$toname.'<'.$to.'>', | |
| 'subject'=>$subject, | |
| 'html'=>$html, |