defined instagram interface
This commit is contained in:
@@ -31,30 +31,6 @@ class Instagram:
|
|||||||
def close(self) -> None:
|
def close(self) -> None:
|
||||||
self.webdriver.close()
|
self.webdriver.close()
|
||||||
|
|
||||||
# def load_post(self, url: str) -> None:
|
|
||||||
# """Load post webpage."""
|
|
||||||
# logging.debug("getting %s", url)
|
|
||||||
# self.webdriver.get(url)
|
|
||||||
# logging.debug("finished getting url")
|
|
||||||
# # handle popup
|
|
||||||
# try:
|
|
||||||
# logging.debug("waiting for cookie popup to appear")
|
|
||||||
# # wait forpopup to appear
|
|
||||||
# elem = WebDriverWait(
|
|
||||||
# driver=self.webdriver,
|
|
||||||
# timeout=60
|
|
||||||
# ).until(
|
|
||||||
# expected_conditions.presence_of_element_located(
|
|
||||||
# (By.XPATH, "//*[text()='Decline optional cookies']")
|
|
||||||
# )
|
|
||||||
# )
|
|
||||||
# logging.debug("located button")
|
|
||||||
# except TimeoutError:
|
|
||||||
# logging.error("Timeout before cookie popup appeared.")
|
|
||||||
# else:
|
|
||||||
# elem.click()
|
|
||||||
# logging.debug("clicked button")
|
|
||||||
|
|
||||||
def get_image_url_list(self, url: str) -> list[str]:
|
def get_image_url_list(self, url: str) -> list[str]:
|
||||||
"""Get list of image urls from post."""
|
"""Get list of image urls from post."""
|
||||||
logging.debug('getting %s', url)
|
logging.debug('getting %s', url)
|
||||||
|
|||||||
Reference in New Issue
Block a user