# Path: shiori/core/settings.py
# FEED_EXCLUDE_FQDN = (
#     # 'shiori.example.org',
# )


from django.core.exceptions import ValidationError
    from urllib.parse import urlparse
    from urlparse import urlparse
from netaddr import IPAddress, AddrFormatError
from shiori.core.settings import FEED_EXCLUDE_FQDN
import sys
import socket
# -*- coding: utf-8 -*-
""" module for validataion of agent """
if sys.version_info > (3, 0):
else:


def validate_url(value):
    """
    Argument:
        value: url (eg. http://example.org/rss)
    Return:
        True or raise exceptions
    """
    hostname = urlparse(value).netloc
    if ':' in hostname:
        hostname = hostname.split(':')[0]

# Path: shiori/core/settings.py
# FEED_EXCLUDE_FQDN = (
#     # 'shiori.example.org',
# )


# Path: shiori/bookmark/validators.py
from django.core.exceptions import ValidationError
    from urllib.parse import urlparse
    from urlparse import urlparse
from netaddr import IPAddress, AddrFormatError
from shiori.core.settings import FEED_EXCLUDE_FQDN
import sys
import socket

# -*- coding: utf-8 -*-
""" module for validataion of agent """
if sys.version_info > (3, 0):
else:


def validate_url(value):
    """
    Argument:
        value: url (eg. http://example.org/rss)
    Return:
        True or raise exceptions
    """
    hostname = urlparse(value).netloc
    if ':' in hostname:
        hostname = hostname.split(':')[0]

    if hostname in FEED_EXCLUDE_FQDN: