Add verbose logging and fix character limit in Twitter class
This commit is contained in:
1 parent
d206ec2461
commit
cdc7341880
2 files changed
+10
-3
No files matched your search
@@ -1,5 +1,6 @@
|
||||
import g4f
|
||||
|
||||
from status import *
|
||||
from config import *
|
||||
from constants import *
|
||||
from .Twitter import Twitter
|
||||
@@ -73,12 +74,18 @@ class AffiliateMarketing:
|
||||
# Get the product name
|
||||
product_title: str = self.browser.find_element(By.ID, AMAZON_PRODUCT_TITLE_ID).text
|
||||
|
||||
if get_verbose():
|
||||
info(f"Product Title: {product_title}")
|
||||
|
||||
# Set the product title
|
||||
self.product_title: str = product_title
|
||||
|
||||
# Get the features of the product
|
||||
features: any = self.browser.find_elements(By.ID, AMAZON_FEATURE_BULLETS_ID)
|
||||
|
||||
if get_verbose():
|
||||
info(f"Features: {features}")
|
||||
|
||||
# Set the features
|
||||
self.features: any = features
|
||||
|
||||
|
||||
@@ -193,9 +193,9 @@ class Twitter:
|
||||
sys.exit(1)
|
||||
|
||||
# Apply Regex to remove all *
|
||||
completion = re.sub(r"\*", "", completion)
|
||||
completion = re.sub(r"\*", "", completion).replace("\"", "")
|
||||
|
||||
if len(completion) >= 280:
|
||||
self.generate_post()
|
||||
if len(completion) >= 560:
|
||||
return self.generate_post()
|
||||
|
||||
return completion
|
||||
Reference in new issue
Block a user