def __init__(self, forum_id: int, page_id: int, base_host: str = "sex8.cc"): self.page_id = page_id self.forum_id = forum_id self.base_host = base_host LazySoup.__init__(self, self.url)
def __init__(self, index: int, base_host: str = "www.xvideos.com"): assert 0 <= index <= 19999, "index out of range" self._new_index = index base = "https://{}/".format(base_host) if index == 0: url = base else: url = urljoin(base, "new/{}".format(self._new_index)) self._video_id_list: Optional[List[str]] = None LazySoup.__init__(self, url)
def __init__(self, relative_uri: str = None, video_id: Union[int, str] = None, base_host: str = "www.xvideos.com"): if relative_uri is None and video_id is None: raise Exception("relative_uri or video_id at least input one!") if video_id is not None: self.video_id = video_id self.relative_uri = "/video{}/".format(video_id) else: self.video_id = relative_uri.strip("/").split("/")[0] self.relative_uri = relative_uri self._title: Optional[str] = None self._duration: Optional[int] = None self._size: Optional[dict] = None self._categories: Optional[List[str]] = None self._video_link: Optional[str] = None self._preview_images: Optional[List[str]] = None LazySoup.__init__(self, urljoin("https://" + base_host, self.relative_uri))