Skip to content

Instantly share code, notes, and snippets.

View jeroenbourgois's full-sized avatar
🐢

Jeroen Bourgois jeroenbourgois

🐢
View GitHub Profile
import lxml
import urllib
from lxml.html import fromstring
from lxml import etree
# vars
url = "http://www.makro.be/Content/assortiment/benzinestation/benzineprijzen/1/index.jsp?stat=0"
# methods
@jeroenbourgois
jeroenbourgois / index.php
Created January 23, 2011 13:25
Parse that html
<?php
$oldSetting = libxml_use_internal_errors( true );
libxml_clear_errors();
$html = new DOMDocument();
$html->loadHtmlFile( 'http://www.makro.be/Content/assortiment/benzinestation/benzineprijzen/1/index.jsp?stat=0' );
$xpath = new DOMXPath( $html );
$nodelist = $xpath->query('//div[@class="boxContent"]/table/tr[last()]/td[last()]');
find . -name .svn -print0 | xargs -0 rm -rf