Skip to content

Commit

Permalink
🔥 remove dead code
Browse files Browse the repository at this point in the history
  • Loading branch information
kaixinol committed Nov 22, 2023
1 parent b52c5bb commit 1f20858
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions twitter_user_tweet_crawler/tweet.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ def commit_sqlite(self):
if not is_id_exists(int(self.post_id)):
insert_new_record(self.post_id, self.post_time, self.location)

# @catch
@catch
def load_data(self, available_driver: WebDriver):
self.driver = available_driver

Expand Down Expand Up @@ -137,12 +137,6 @@ def get_via_app(base_dom):
if result.is_displayed():
return html2text(result.get_attribute('innerHTML')).replace('\n\n', '\n')

def remove_elements(base_dom):
element = base_dom.find_element(By.XPATH, '//article[@data-testid=\"tweet\"]//div[@role=\'group\' and '
'@aria-label]')
available_driver.execute_script("arguments[0].parentNode.removeChild(arguments[0]);", element)
element = base_dom.find_element(By.XPATH, '//*/time/ancestor::*[3]')
available_driver.execute_script("arguments[0].parentNode.removeChild(arguments[0]);", element)
available_driver.get(self.link)
available_driver.execute_script(inject)
wait = WebDriverWait(available_driver, 30)
Expand Down

0 comments on commit 1f20858

Please sign in to comment.