26 lines
506 B
Python
Executable file
26 lines
506 B
Python
Executable file
#!/usr/bin/python3
|
|
|
|
"""Fetch new mail notifications for i3blocks.
|
|
|
|
Author: flyingscorpio
|
|
"""
|
|
|
|
import argparse
|
|
import requests
|
|
|
|
|
|
def parse_cli() -> argparse.Namespace:
|
|
"""Parse credentials from the command line."""
|
|
|
|
|
|
with requests.Session() as session:
|
|
req = session.post(
|
|
"https://mail.protonmail.com/api/auth",
|
|
data={
|
|
"Username": "tfranken@protonmail.com",
|
|
},
|
|
headers={
|
|
"x-pm-appversion": "Web_3.16.23",
|
|
},
|
|
)
|
|
print(req.text)
|