def item_urls(self, item, board): urls = set() if "com" in item and item["com"]: urls.update(get_links_from_body(item["com"])) elif "sub" in item and item["sub"]: urls.update(get_links_from_body(item["sub"])) if "fsize" in item and item["fsize"]: urls.add(self.image_url(board, item["tim"], item["ext"])) return list(urls)
def item_urls(self, item, board): urls = set() if "com" in item and item["com"]: urls.update(get_links_from_body(item["com"])) elif "sub" in item and item["sub"]: urls.update(get_links_from_body(item["sub"])) if "fsize" in item and item["fsize"]: urls.add(self._image_url + self._image_path + item["tim"] + "/" + str(item["no"]) + item["ext"]) return list(urls)
def item_urls(self, item, board): urls = set() if "message" in item and item["message"]: urls.update(get_links_from_body(item["message"])) elif "subject" in item and item["subject"]: urls.update(get_links_from_body(item["subject"])) if item["files"]: for file in item["files"]: urls.add(self._image_url % file["storage"] + file["name"] + "." + file["ext"]) return list(urls)
def item_urls(self, item, board): urls = set() if "comment" in item and item["comment"]: urls.update(get_links_from_body(item["comment"])) elif "subject" in item and item["subject"]: urls.update(get_links_from_body(item["subject"])) for file in item["files"]: urls.add(self._base_url.rstrip("/") + file["path"]) return list(urls)
def item_urls(self, item, board): urls = set() if "content_raw" in item and item["content_raw"]: urls.update(get_links_from_body(item["content_raw"])) if "attachments" in item and item["attachments"]: for attachment in item["attachments"]: urls.add(urljoin(self._image_url, attachment["file_url"])) return list(urls)