diff --git a/tests/CI.py b/tests/CI.py index a48556a..8d8ba2c 100644 --- a/tests/CI.py +++ b/tests/CI.py @@ -1,4 +1,5 @@ import unittest +from pathlib import Path from selenium import webdriver from selenium.webdriver.chrome.webdriver import WebDriver @@ -21,6 +22,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.save_screenshot('debug.png') + print('fuck u twitter') + print(Path('debug.png').absolute()) self.assertEqual(True,True) # add assertion here diff --git a/twitter_user_tweet_crawler/pool.py b/twitter_user_tweet_crawler/pool.py index e5a89bc..c3ccd51 100644 --- a/twitter_user_tweet_crawler/pool.py +++ b/twitter_user_tweet_crawler/pool.py @@ -38,8 +38,6 @@ 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 - index.save_screenshot('debug.png') - print('fuck u twitter') - print(Path('debug.png').absolute()) + self.browser[elements].__dict__['is_using'] = False self.check_and_work()