public
Description: Small RDF python scraper for gumtree ads (include geocoding)
Clone URL: git://github.com/moustaki/flatscrap.git
Exceptions over image lookup
moustaki (author)
Thu Mar 06 10:52:10 -0800 2008
commit  f1a66b250ddc871ec225d054f5af65ee11db8e92
tree    3d66ca0e6e92856bd256ff7e83c290c0545a2e1f
parent  aec926b6d02d5e9f8cb6a5941c0ebd487ed6aa47
...
27
28
29
30
31
 
 
 
 
32
33
34
...
27
28
29
 
 
30
31
32
33
34
35
36
0
@@ -27,8 +27,10 @@ if email1.startswith('/cgi-bin'):
0
   email = "http://www.gumtree.com"+email1
0
 else :
0
   email = email1
0
-image = "http://www.gumtree.com"+soup('div',id="images")[0].contents[1].attrs[0][1]
0
-
0
+try:
0
+ image = "http://www.gumtree.com"+soup('div',id="images")[0].contents[1].attrs[0][1]
0
+except:
0
+ image = ''
0
 
0
 #tel = clean(soup('div',id="replyto")[0].contents[0].contents[3])
0
 

Comments

    No one has commented yet.