This file contains 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
<?php | |
/* | |
Template Name: Extended category | |
(we want to enable many plugins that do not work with the default category template) | |
*/ | |
?> | |
<?php |
This file contains 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
require 'nokogiri' | |
require 'net/http' | |
require 'uri' | |
require 'cgi' | |
def data_for(id) | |
uri, nice_data = URI.parse('http://tsje.gov.py/dinamics/app/consulta-al-padron.php'), {} | |
http = Net::HTTP.new(uri.host, uri.port); req = Net::HTTP::Post.new(uri.path); req['Host'] = 'tsje.gov.py'; req['Referer'] = 'http://tsje.gov.py/'; req['X-Requested-With'] = 'XMLHttpRequest'; req.set_form_data( { 'cedula' => id }); res = http.request(req); raw_html = res.body; span6_count = 0 |
NewerOlder