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


import tweepy
import re
import feedparser
import subprocess
import redis
from six.moves import map
from celery import task
from malware_crawl.defaults import redis_db, REQUESTS_SESSIONS
            list.append(to_unicode(e.title))
        return list
    titleList = []
    for url in urlList:
        l = rssParse(url)
        titleList = titleList + l
    return titleList

ASPELL_KEY = "aspell"


def load_aspell():
    dump = subprocess.Popen(
        ['aspell', '-d', 'en', 'dump', 'master'],
        stdout=subprocess.PIPE,
    )

    expand = subprocess.Popen(
        ['aspell', '-l', 'en', 'expand'],
        stdin=dump.stdout,
        stdout=subprocess.PIPE,
    )

    dump.stdout.close()
    return expand.communicate()[0].split('\n')


def update_aspell():
    word_list = load_aspell()
    print len(word_list)

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


# Path: malware_crawl/source.py
import tweepy
import re
import feedparser
import subprocess
import redis
from six.moves import map
from celery import task
from malware_crawl.defaults import redis_db, REQUESTS_SESSIONS

            list.append(to_unicode(e.title))
        return list
    titleList = []
    for url in urlList:
        l = rssParse(url)
        titleList = titleList + l
    return titleList

ASPELL_KEY = "aspell"


def load_aspell():
    dump = subprocess.Popen(
        ['aspell', '-d', 'en', 'dump', 'master'],
        stdout=subprocess.PIPE,
    )

    expand = subprocess.Popen(
        ['aspell', '-l', 'en', 'expand'],
        stdin=dump.stdout,
        stdout=subprocess.PIPE,
    )

    dump.stdout.close()
    return expand.communicate()[0].split('\n')


def update_aspell():
    word_list = load_aspell()
    print len(word_list)

    pipe = redis_db["master"].pipeline(use_transaction=True)