Fix minor issues

This commit is contained in:
ChronosX88 2022-12-03 22:12:03 +03:00
parent 5826aaf8f8
commit f083543aa5
Signed by: ChronosXYZ
GPG Key ID: 52A90DE5862D8321
3 changed files with 520 additions and 409 deletions

View File

@ -12,6 +12,7 @@ toml = "*"
dataset = "*"
[dev-packages]
mypy = "*"
[requires]
python_version = "3.10"

922
Pipfile.lock generated

File diff suppressed because it is too large Load Diff

View File

@ -11,8 +11,8 @@ from mastodon import Mastodon
import utils
parser = argparse.ArgumentParser()
parser.add_argument("-c", "--config", help="Config path")
parser.add_argument("-g", "--group", help="VK group to archive")
parser.add_argument("-c", "--config", help="Config path", required=True)
parser.add_argument("-g", "--group", help="VK group to archive", required=True)
args = parser.parse_args()
config = toml.load(args.config)
@ -47,7 +47,7 @@ if group_last_post_count is None:
else:
# download only necessary posts from vk
last_post_count = group_last_post_count["count"]
posts_raw["items"] = asyncio.run(utils.download_posts_incrementally(vk, args.group, last_post_count))
posts_raw = asyncio.run(utils.download_posts_incrementally(vk, args.group, last_post_count))
posts = posts_raw["items"]
for p in posts:
if uploaded_posts.find_one(group=args.group, post_id=p["id"]) is not None: