Skip to content

Commit

Permalink
Fix time stamp issues.
Browse files Browse the repository at this point in the history
  • Loading branch information
Maxfield-Chen committed Apr 6, 2021
1 parent 72bcb3b commit 38de0bc
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Main.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,9 @@ def getNewPosts(kofi_url: str) -> List[str]:
firefox_options.add_argument("--headless")
driver = webdriver.Firefox(firefox_options=firefox_options)
driver.get(kofi_url)
feed_items = list(map(lambda i: ''.join(i.text.split('\n')[:2]), driver.find_elements_by_class_name("feeditem-unit")))
# Remove the time stamp from blog post output,
# otherwise we will repost blogs based on the different time.
feed_items = list(map(lambda i: '\n'.join(i.text.split('\n')[2:]), driver.find_elements_by_class_name("feeditem-unit")))
new_items = getNewItems(feed_items)
finally:
try:
Expand Down

0 comments on commit 38de0bc

Please sign in to comment.