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(