# -*- coding: utf-8 -*-
# Copyright 2023 Mike Fährmann
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation.
"""Extractors for https://vipergirls.to/"""
from .common import Extractor, Message
from .. import text, exception
BASE_PATTERN = r"(?:https?://)?(?:www\.)?vipergirls\.to"
class VipergirlsExtractor(Extractor):
"""Base class for vipergirls extractors"""
category = "vipergirls"
root = "https://vipergirls.to"
def __init__(self, match):
Extractor.__init__(self, match)
self.session.headers["Referer"] = self.root
def items(self):
for html in self.posts():
pos = html.find('")[2].strip()),
}
yield Message.Directory, data
for href in text.extract_iter(html, '', '')
url = text.extr(page, '', '', pos)[0],)
except Exception:
raise exception.NotFoundError("post")