Skip to content

Commit

Permalink
Bump version
Browse files Browse the repository at this point in the history
  • Loading branch information
kaiwk committed Mar 26, 2022
1 parent eab7a31 commit d422630
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
9 changes: 7 additions & 2 deletions my_cookies/my_cookies.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
def main():
"""Print cookies."""
cookiejar = None

try:
cookiejar = browser_cookie3.chrome(domain_name="leetcode.com")
except Exception:
Expand All @@ -25,10 +26,14 @@ def main():
print("get cookie from Microsoft Edge failed", file=sys.stderr)
return

leetcode_cookies = list(filter(lambda c: c.name in ("LEETCODE_SESSION", "csrftoken"), cookiejar))
leetcode_cookies = list(
filter(lambda c: c.name in ("LEETCODE_SESSION", "csrftoken"), cookiejar)
)

if len(leetcode_cookies) < 2:
print("get cookie failed, make sure you have Chrome or Firefox installed and login in LeetCode with one of them at least once.")
print(
"get cookie failed, make sure you have Chrome or Firefox installed and login in LeetCode with one of them at least once."
)
return

for c in leetcode_cookies:
Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
setup(
name="my_cookies",
packages=["my_cookies"],
version="0.1.1",
version="0.1.2",
license="MIT",
description="Retrieve chrome cookies",
author="Wang Kai",
author_email="kaiwkx@gmail.com",
url="/~https://github.com/kaiwk/my_cookies",
download_url="/~https://github.com/kaiwk/my_cookies",
keywords=["browser", "cookies"],
scripts=['bin/my_cookies'],
scripts=["bin/my_cookies"],
install_requires=["browser_cookie3"],
classifiers=[
# Chose either "3 - Alpha", "4 - Beta", or "5 - Production/Stable"
Expand Down

0 comments on commit d422630

Please sign in to comment.