|
@ -1,10 +1,9 @@ |
|
|
from .archive import archiver |
|
|
from .archive import archiver |
|
|
from .common import SELENIUM_EXCEPTIONS, click_button |
|
|
from .common import SELENIUM_EXCEPTIONS, click_button, timestamp_now |
|
|
from .config import settings |
|
|
from .config import settings |
|
|
from selenium.webdriver.common.action_chains import ActionChains |
|
|
from selenium.webdriver.common.action_chains import ActionChains |
|
|
|
|
|
|
|
|
import attr |
|
|
import attr |
|
|
import datetime |
|
|
|
|
|
import time |
|
|
import time |
|
|
import uuid |
|
|
import uuid |
|
|
|
|
|
|
|
@ -13,14 +12,14 @@ import uuid |
|
|
class Post: |
|
|
class Post: |
|
|
content = attr.ib() |
|
|
content = attr.ib() |
|
|
comments = attr.ib(default=[]) |
|
|
comments = attr.ib(default=[]) |
|
|
date = attr.ib(factory=datetime.datetime.now) |
|
|
date = attr.ib(factory=timestamp_now) |
|
|
name = attr.ib(factory=lambda: uuid.uuid4().hex) |
|
|
name = attr.ib(factory=lambda: uuid.uuid4().hex) |
|
|
|
|
|
|
|
|
@attr.s |
|
|
@attr.s |
|
|
class Comment: |
|
|
class Comment: |
|
|
commenter = attr.ib() |
|
|
commenter = attr.ib() |
|
|
content = attr.ib() |
|
|
content = attr.ib() |
|
|
date = attr.ib(factory=datetime.datetime.now) |
|
|
date = attr.ib(factory=timestamp_now) |
|
|
name = attr.ib(factory=lambda: uuid.uuid4().hex) |
|
|
name = attr.ib(factory=lambda: uuid.uuid4().hex) |
|
|
|
|
|
|
|
|
# Used as a threshold to avoid running forever |
|
|
# Used as a threshold to avoid running forever |
|
|