public
Description: Small RDF python scraper for gumtree ads (include geocoding)
Clone URL: git://github.com/moustaki/flatscrap.git
moustaki (author)
Thu Mar 06 10:01:41 -0800 2008
commit  7451b32ab44f631c168f3dc7bcbafc61c4d3161f
tree    5e6ee667d9370c3de833fe4ef68c2325347368c2
parent  42068eb2abd4a916f4d6083592caed9deec21fed
flatscrap / gtscrap.py
100755 21 lines (11 sloc) 0.278 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/usr/bin/python
import urllib
import sys
from BeautifulSoup import BeautifulSoup
 
print "Scrapping "+sys.argv[1]
 
f = urllib.urlopen(sys.argv[1])
html = f.read()
f.close()
 
soup = BeautifulSoup(html)
 
location = soup('span','location')[0].contents[1][6:]
 
print location