#!/usr/bin/env python
import urllib
from BeautifulSoup import BeautifulStoneSoup as bs
xml = bs(urllib.urlopen('https://www.gstatic.com/s2/sitemaps/profiles-sitemap.xml').read())
for i in xml.findAll('loc':
try:
urllib.urlretrieve(i.text, i.text[35:])
print 'ownloaded %s' % i.text[35:]
except Exception, err:
print '%s could not be retrieved' % i.text
print 'All done'
Copyright © 2024, NextGenUpdate.
All Rights Reserved.