Source code for darc.sites.irc

# -*- coding: utf-8 -*-
# pylint: disable=ungrouped-imports
"""IRC Addresses

The :mod:`darc.sites.irc` module is customised to
handle IRC addresses.


from typing import TYPE_CHECKING

from darc.error import LinkNoReturn
from darc.proxy.irc import save_irc
from darc.sites._abc import BaseSite

    from typing import NoReturn

    from requests import Session
    from selenium.webdriver import Chrome as Driver

    import as darc_link  # Link
    from darc._compat import datetime

[docs]class IRC(BaseSite): """IRC addresses."""
[docs] @staticmethod def crawler(timestamp: 'datetime', session: 'Session', link: 'darc_link.Link') -> 'NoReturn': # pylint: disable=unused-argument """Crawler hook for IRC addresses. Args: timestamp: Timestamp of the worker node reference. session (:class:`requests.Session`): Session object with proxy settings. link: Link object to be crawled. Raises: LinkNoReturn: This link has no return response. """ save_irc(link) raise LinkNoReturn(link)
[docs] @staticmethod def loader(timestamp: 'datetime', driver: 'Driver', link: 'darc_link.Link') -> 'NoReturn': # pylint: disable=unused-argument """Not implemented. Raises: LinkNoReturn: This hook is not implemented. """ raise LinkNoReturn(link)