# Path: scrapcore/database.py
# class ScraperSearch(Base):
# class SearchEngineResultsPage(Base):
# class Link(Base):
# class RelatedKeyword(Base):
# class Proxy(Base):
# class SearchEngine(Base):
# class SearchEngineProxyStatus(Base):
#     def __str__(self):
#     def __repr__(self):
#     def __str__(self):
#     def __repr__(self):
#     def has_no_results_for_query(self):
#     def set_values_from_parser(self, parser):
#     def set_values_from_scraper(self, scraper):
#     def was_correctly_requested(self):
#     def __str__(self):
#     def __repr__(self):
#     def __str__(self):
#     def __repr__(self):
#     def __str__(self):
#     def __repr__(self):
# def get_engine(config, path=None):
# def get_session(config, scoped=False, engine=None, path=None):
# def fixtures(config, session):
# SERP = SearchEngineResultsPage


from collections import namedtuple
from scrapcore import database
import csv
import json
import os
import threading
                                    port=port,
                                    username=username,
                                    password=password
                                )
                            )
                        else:
                            proxies.append(
                                self.Proxy(
                                    proto=proto,
                                    host=host,
                                    port=port,
                                    username='',
                                    password=''
                                )
                            )
            return proxies
        else:
            raise ValueError('No such file/directory')

    def add_proxies_to_db(self, proxies, session):
        """Adds the list of proxies to the database.
        If the proxy-ip already exists and the other data differs,
        it will be overwritten.
        Will not check the status of the proxy.
        Args:
            proxies: A list of proxies.
            session: A database session to work with.
        """
        for proxy in proxies:
            if proxy:

# Path: scrapcore/database.py
# class ScraperSearch(Base):
# class SearchEngineResultsPage(Base):
# class Link(Base):
# class RelatedKeyword(Base):
# class Proxy(Base):
# class SearchEngine(Base):
# class SearchEngineProxyStatus(Base):
#     def __str__(self):
#     def __repr__(self):
#     def __str__(self):
#     def __repr__(self):
#     def has_no_results_for_query(self):
#     def set_values_from_parser(self, parser):
#     def set_values_from_scraper(self, scraper):
#     def was_correctly_requested(self):
#     def __str__(self):
#     def __repr__(self):
#     def __str__(self):
#     def __repr__(self):
#     def __str__(self):
#     def __repr__(self):
# def get_engine(config, path=None):
# def get_session(config, scoped=False, engine=None, path=None):
# def fixtures(config, session):
# SERP = SearchEngineResultsPage


# Path: scrapcore/tools.py
from collections import namedtuple
from scrapcore import database
import csv
import json
import os
import threading

                                    port=port,
                                    username=username,
                                    password=password
                                )
                            )
                        else:
                            proxies.append(
                                self.Proxy(
                                    proto=proto,
                                    host=host,
                                    port=port,
                                    username='',
                                    password=''
                                )
                            )
            return proxies
        else:
            raise ValueError('No such file/directory')

    def add_proxies_to_db(self, proxies, session):
        """Adds the list of proxies to the database.
        If the proxy-ip already exists and the other data differs,
        it will be overwritten.
        Will not check the status of the proxy.
        Args:
            proxies: A list of proxies.
            session: A database session to work with.
        """
        for proxy in proxies:
            if proxy:

                p = session.query(database.Proxy).filter(proxy.host == database.Proxy.ip).first()