old_contents: from __future__ import division
  import requests
  from urlparse import urlparse
  from six.moves import zip
  
  wot_api_target = "https://api.mywot.com/0.4/public_link_json"
  
  
  def wot_malware_scan(urls):
      domains = [urlparse(url).netloc for url in urls]
      response = requests.get(
          wot_api_target,
          params={"hosts": ('/').join(set(domains)) + '/'}
      )
      return list(zip(
          urls,
          (response.json[domain] for domain in domains)
      ))
  
  
  if __name__ == "__main__":
      print wot_malware_scan(("http://google.com", "http://yahoo.com"))
  
new_contents: from __future__ import division
  import requests
  from urlparse import urlparse
  from celery import task
  from celery.contrib.batches import Batches
  
  wot_api_target = "https://api.mywot.com/0.4/public_link_json"
  
  
  @task(base=Batches, flush_every=100, flush_interval=10)
  def wot_malware_scan(requests):
      return wot_malware_scan((request.kwargs["url"] for request in requests))
  
  
  def wot_malware_scan_real(urls):
      domains = [urlparse(url).netloc for url in urls]
      response = requests.get(
          wot_api_target,
          params={"hosts": ('/').join(set(domains)) + '/'}
      )
      return [response.json[domain] for domain in domains]
  
  
  if __name__ == "__main__":
      print wot_malware_scan_real(("http://google.com", "http://yahoo.com"))
  
subject: add decorated version of WOT api, using celery Batches