1
0
Fork 0
mirror of synced 2024-05-19 19:52:41 +12:00

Update connector for 7 digit ID's

This commit is contained in:
OMEGARAZER 2023-01-01 03:46:08 -05:00
parent 0bb94040d6
commit b6edc36753
No known key found for this signature in database
GPG key ID: D89925310D306E35
2 changed files with 2 additions and 1 deletions

View file

@ -301,7 +301,7 @@ class RedditConnector(metaclass=ABCMeta):
def get_submissions_from_link(self) -> list[list[praw.models.Submission]]:
supplied_submissions = []
for sub_id in self.args.link:
if len(sub_id) == 6:
if len(sub_id) in (6, 7):
supplied_submissions.append(self.reddit_instance.submission(id=sub_id))
else:
supplied_submissions.append(self.reddit_instance.submission(url=sub_id))

View file

@ -167,6 +167,7 @@ def test_create_authenticator(downloader_mock: MagicMock):
("lvpf4l",),
("lvpf4l", "lvqnsn"),
("lvpf4l", "lvqnsn", "lvl9kd"),
("1000000",),
),
)
def test_get_submissions_from_link(