diff --git a/twitter_user_tweet_crawler/tweet.py b/twitter_user_tweet_crawler/tweet.py index aaa5a6f..aebe59d 100644 --- a/twitter_user_tweet_crawler/tweet.py +++ b/twitter_user_tweet_crawler/tweet.py @@ -87,11 +87,9 @@ def click_sensitive_element(): result = None available_driver.get(self.link) + available_driver.implicitly_wait(20) wait = WebDriverWait(available_driver, 20) - element = wait.until(EC.presence_of_element_located((By.XPATH, '//*[@id="react-root"]/div/div/div[' - '2]/main//section/div/div/div[' - '1]/div/div/article/div/div/div[' - '3]//*/time/ancestor::*[3]'))) + element = wait.until(EC.presence_of_element_located((By.XPATH, '//*/time/ancestor::*[3]'))) time_stamp = element.find_element(By.XPATH, '//time').get_attribute('datetime') location = True try: