Skip to content

Commit

Permalink
doc(twspace, twspace_dl): add documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
mikelei8291 committed May 24, 2023
1 parent b29e3b5 commit 2ecc9af
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion twspace_dl/twspace.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def __init__(self, metadata: dict) -> None:
if creator_info := root["creator_results"]["result"].get("legacy"): # type: ignore
self["creator_name"] = creator_info["name"] # type: ignore
self["creator_screen_name"] = creator_info["screen_name"] # type: ignore
self["creator_profile_image_url"] = creator_info["profile_image_url_https"].replace("_normal", "")
self["creator_profile_image_url"] = creator_info["profile_image_url_https"].replace("_normal", "") # type: ignore
self["creator_id"] = twitter.user_id(
"https://twitter.com/" + creator_info["screen_name"]
)
Expand Down
1 change: 1 addition & 0 deletions twspace_dl/twspace_dl.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,7 @@ def download(self) -> None:
logging.info("Finished downloading")

def embed_cover(self):
"""Embed the user profile image as the cover art"""
cover_url = self.space["creator_profile_image_url"]
cover_ext = cover_url.split(".")[-1]
response = self.session.get(cover_url)
Expand Down

0 comments on commit 2ecc9af

Please sign in to comment.