Skip to content

Commit

Permalink
yes
Browse files Browse the repository at this point in the history
  • Loading branch information
ziggoon committed Dec 8, 2023
1 parent ad0df50 commit 16285a7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
1 change: 0 additions & 1 deletion python/db/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@ def update_status(self, username, status):

def insert_hashtag_video(self, username, video: Video):
collection = self.db["hashtag_videos"]
collection.create_index(video.url, unique=True)

try:
collection.insert_one({"username": username, "author": video.author, "description": video.description, "likes": video.likes, "comments": video.comments, "bookmarks": video.bookmarks, "shares": video.shares, "date": video.date, "sound": video.sound, "url": video.url, "timestmap": datetime.now.isoformat()})
Expand Down
4 changes: 2 additions & 2 deletions python/tiktok/bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ def start(self, db):
likes = self.driver.find_element(By.XPATH, "//strong[contains(@data-e2e, 'browse-like-count')]").text
comments = self.driver.find_element(By.XPATH, "//strong[contains(@data-e2e, 'browse-comment-count')]").text
bookmarks = self.driver.find_element(By.XPATH, "//strong[contains(@data-e2e, 'undefined-count')]").text
post_date = self.driver.find_element(By.XPATH, "//span[contains(@data-e2e, 'browser-nickname')]").text.split("\n", 2)[2]
post_date = self.driver.find_element(By.XPATH, "//span[contains(@data-e2e, 'browser-nickname')]").text
video_sound = self.driver.find_element(By.XPATH, "//div[contains(@class, 'epjbyn3')]").text
video_url = self.driver.current_url

Expand Down Expand Up @@ -244,7 +244,7 @@ def start(self, db):
comments = self.driver.find_element(By.XPATH, "//strong[contains(@data-e2e, 'browse-comment-count')]").text
bookmarks = self.driver.find_element(By.XPATH, "//strong[contains(@data-e2e, 'undefined-count')]").text
shares = self.driver.find_element(By.XPATH, "//strong[contains(@data-e2e, 'share-count')]").text
post_date = self.driver.find_element(By.XPATH, "//span[contains(@data-e2e, 'browser-nickname')]").text.split("\n", 2)[2]
post_date = self.driver.find_element(By.XPATH, "//span[contains(@data-e2e, 'browser-nickname')]").text
video_sound = self.driver.find_element(By.XPATH, "//div[contains(@class, 'epjbyn3')]").text
video_url = self.driver.current_url

Expand Down

0 comments on commit 16285a7

Please sign in to comment.