summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEUcancER <root@euer.krebsco.de>2012-04-18 11:28:20 +0200
committerEUcancER <root@euer.krebsco.de>2012-04-18 11:28:20 +0200
commit2a739377f53d7e7f9000683eff00ed40f56b14aa (patch)
tree4b211c4b73f3e08cbd67151dcb414f0cc1bfc8f7
parent14eea1de9f193d8e31e8381ea12d34703d6d5ad3 (diff)
fix url parser
-rwxr-xr-xReaktor/commands/revip5
1 files changed, 3 insertions, 2 deletions
diff --git a/Reaktor/commands/revip b/Reaktor/commands/revip
index 1d20037d..b4920f52 100755
--- a/Reaktor/commands/revip
+++ b/Reaktor/commands/revip
@@ -6,6 +6,7 @@ import os
import json
import socket
import httplib
+from urlparse import urlparse
try:
target = sys.argv[1]
except:
@@ -25,7 +26,7 @@ for a in aliases:
sites[a] = ""
offset = 0
appid = os.environ.get("BING_APPID",'7A0B8DA3E913BE5ECB4AF11C7BC398B43000DC1C')
-while offset < 50:
+while offset < 300:
url ="/json.aspx?AppId=%s&Query=ip:%s&Sources=Web+RelatedSearch+News+Image+Video&Version=2.2&Market=en-us&Web.Count=50&Web.Offset=%s&Web.Options=DisableQueryAlterations" % (appid, ip, offset)
conn = httplib.HTTPConnection("api.bing.net")
conn.request("GET", url)
@@ -35,7 +36,7 @@ while offset < 50:
results = doc["SearchResponse"]["Web"]["Results"]
conn.close()
for res in results:
- sites[res['DisplayUrl']] = ""
+ sites[urlparse(res['Url'])[1]] = ""
offset += 50
except:
break