added nfws restriction and changed some shit in the ps
Signed-off-by: Ebbe Baß <ebbe@ping-mee.de>master
parent
d615dfdf95
commit
0229f63df2
|
@ -1,10 +1,8 @@
|
||||||
Function Set-WallPaper($Value){
|
Function Set-WallPaper($Value){
|
||||||
$url = "https://motd.ping-mee.de/wallpaper.png";
|
Invoke-WebRequest "https://motd.ping-mee.de/wallpaper.png" -OutFile "$($value)wallpaper.png"
|
||||||
$wc = New-Object System.Net.WebClient
|
Set-ItemProperty -path 'HKCU:\Control Panel\Desktop\' -name wallpaper -value "$($value)wallpaper.png"
|
||||||
$wc.DownloadFile($url, "C:\temp\wallpaper.png")
|
|
||||||
Invoke-WebRequest $url -OutFile C:\temp\wallpaper.png
|
|
||||||
Set-ItemProperty -path 'HKCU:\Control Panel\Desktop\' -name wallpaper -value $value
|
|
||||||
rundll32.exe user32.dll, UpdatePerUserSystemParameters
|
rundll32.exe user32.dll, UpdatePerUserSystemParameters
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Set-WallPaper -value "C:\temp\wallpaper.png"
|
Set-WallPaper -value "C:\temp\"
|
|
@ -27,6 +27,7 @@ subreddit = reddit.subreddit(subreddit_name)
|
||||||
posts = subreddit.top(time_filter="day", limit=5)
|
posts = subreddit.top(time_filter="day", limit=5)
|
||||||
for post in posts:
|
for post in posts:
|
||||||
try:
|
try:
|
||||||
|
if post.over_18 == False:
|
||||||
print(post.url)
|
print(post.url)
|
||||||
if post.url.endswith(".png") or post.url.endswith(".jpg"):
|
if post.url.endswith(".png") or post.url.endswith(".jpg"):
|
||||||
debugging_message("Found a new post: "+post.title+" ("+post.id+")")
|
debugging_message("Found a new post: "+post.title+" ("+post.id+")")
|
||||||
|
|
Loading…
Reference in New Issue