Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
22 lines (18 sloc) 698 Bytes
import os
from urllib import urlopen
from pyquery import PyQuery as pq
base = ''
d = pq(url=base + '/licenses-state.php')
def download_page(url):
D = pq(url=url)
for img in D('div img'):
if 'state-licenses' in img.attrib.get('src'):
d_url = base + img.attrib.get('src')
destination = os.path.join('plates',
with open(destination, 'wb') as f:
print destination
for each in d('td a'):
if each.attrib.get('href','').endswith('license.php'):
download_page(base + each.attrib.get('href'))