Start style
This commit is contained in:
parent
92d25dc356
commit
6f55b74c26
@ -1,6 +1,7 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>Saved Posts</title>
|
||||
<style></style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
3
html/style.css
Normal file
3
html/style.css
Normal file
@ -0,0 +1,3 @@
|
||||
a {
|
||||
display: block;
|
||||
}
|
@ -1,6 +1,7 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>Upvoted Posts</title>
|
||||
<style></style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
3
save.py
3
save.py
@ -34,6 +34,9 @@ for post in get_posts(client):
|
||||
with open(os.path.join("html", html_file)) as f:
|
||||
html = f.read()
|
||||
|
||||
with open(os.path.join("html", "style.css")) as f:
|
||||
html = html.replace("<style></style>", f"<style>\n{f.read()}\n</style>")
|
||||
|
||||
html = html.replace("<!--posts-->", "\n".join(posts_html))
|
||||
|
||||
with open(os.path.join(location, html_file), "w") as f:
|
||||
|
@ -15,7 +15,7 @@ def make_client():
|
||||
|
||||
|
||||
def get_saved_posts(client):
|
||||
for saved in client.user.me().saved(limit=None):
|
||||
for saved in client.user.me().saved(limit=10):
|
||||
if saved.__class__.__name__ == "Submission":
|
||||
yield saved
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user