Skip to content

Commit

Permalink
fuck u github ci
Browse files Browse the repository at this point in the history
  • Loading branch information
kaixinol committed Nov 12, 2023
1 parent a97f871 commit 5af6fd1
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 10 deletions.
8 changes: 2 additions & 6 deletions tests/CI.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ def get_browser() -> WebDriver:
chrome_options.add_argument('--disable-gpu')
chrome_options.add_argument('--no-sandbox')
chrome_options.add_argument('--headless')
chrome_options.add_argument('--disable-dev-shm-usage')
chrome_options.add_argument('--remote-debugging-pipe')
driver = webdriver.Chrome(options=chrome_options)
return driver

Expand All @@ -25,11 +23,9 @@ def test_spider(self):
broswer = get_browser()
tweet = Tweet('https://twitter.com/_CASTSTATION/status/1697029186777706544', is_ci_test=True)
tweet.load_data(broswer)
broswer.get('https://twitter.com/_CASTSTATION/status/1697029186777706544')
broswer.implicitly_wait(60)
print(tweet.text)
sleep(20)
broswer.save_screenshot('debug.png')
print('fuck u twitter')
print(Path('debug.png').absolute())
self.assertEqual(True,True) # add assertion here


Expand Down
1 change: 0 additions & 1 deletion twitter_user_tweet_crawler/pool.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,5 @@ def _on_job_complete(self, index, future):
pass
# By default, `concurrent.futures` will silently log errors but will not raise them
# Throw the error directly

self.browser[elements].__dict__['is_using'] = False
self.check_and_work()
4 changes: 1 addition & 3 deletions twitter_user_tweet_crawler/tweet.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,11 +83,9 @@ def click_sensitive_element():
ActionChains(available_driver).move_to_element(i).click().perform()
except:
pass
available_driver.implicitly_wait(0.5)

sleep(0.5)
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, '//*/time/ancestor::*[3]')))
time_stamp = element.find_element(By.XPATH, '//time').get_attribute('datetime')
Expand Down

0 comments on commit 5af6fd1

Please sign in to comment.