# Path: malware_crawl/defaults.py
# REQUESTS_SESSIONS = {
#     "api": requests.Session(),
#     "probe": requests.Session()
# }


import zipfile
import cStringIO as StringIO
import csv
import redis
from urlparse import urlparse
from publicsuffix import PublicSuffixList
from celery import task
from celery.utils.functional import chunks
from malware_crawl.defaults import redis_db, REQUESTS_SESSIONS
from __future__ import division


requests = REQUESTS_SESSIONS["api"]

domains_key = "alexa:domains"



# Path: malware_crawl/defaults.py
# REQUESTS_SESSIONS = {
#     "api": requests.Session(),
#     "probe": requests.Session()
# }


# Path: malware_crawl/scan/alexa.py
import zipfile
import cStringIO as StringIO
import csv
import redis
from urlparse import urlparse
from publicsuffix import PublicSuffixList
from celery import task
from celery.utils.functional import chunks
from malware_crawl.defaults import redis_db, REQUESTS_SESSIONS

from __future__ import division


requests = REQUESTS_SESSIONS["api"]

domains_key = "alexa:domains"



def dict_chunk(mapping, chunk_size):