Account for a couple of changes to DW prompt communities

master
trémeur 7 months ago
parent 9181590385
commit ed6f42a2ae

@ -3,7 +3,7 @@ html {
color: #808080;
background-color: #d5d5ef;
/* opacity: 0.8; */
background-image: repeating-radial-gradient( circle at 0 0, transparent 0, #d5d5ef 28px ), repeating-linear-gradient( #cfcfe755, #cfcfe7 );
background-image: repeating-radial-gradient( circle at 0 0, transparent 0, #d5d5ef 28px ), repeating-linear-gradient( #cfcfe5, #cfcfe7 );
font-family: "Poppins", sans-serif;
}

@ -99,7 +99,7 @@ try:
dove = "https://dove-drabbles.dreamwidth.org/?style=light"
dovepage = requests.get(dove)
dovesoup = BeautifulSoup(dovepage.content, "html.parser")
doveprompts = dovesoup.find_all("h3", string=lambda text: "prompt post" in text.lower())
doveprompts = dovesoup.find_all("h3", string=lambda text: "prompt" in text.lower())
dovesubsoup = BeautifulSoup(str(doveprompts[0]), "html.parser")
doveurl = dovesubsoup.find("a")
doveprompt = (doveurl["href"])
@ -128,7 +128,7 @@ try:
zonepromptpage = s.get(zonepromptnew)
zonepromptsoup = BeautifulSoup(zonepromptpage.content, "html.parser")
zoneprompttext = zonepromptsoup.find(class_="entry-content")
zonetheprompt = zoneprompttext.find("strong")
zonetheprompt = zoneprompttext.find("div")
print("drabble-zone (100 or 200 words): \033[1m" + zonetheprompt.text.lower() + "\033[0m (" + zoneprompt + ")\n")
thefile.write("- [[" + zoneprompt + "][drabble-zone]] (100 or 200 words): *" + zonetheprompt.text.lower() + "*\n")
prompts.append({"source":"drabble-zone","type":"comm","notes":"100 or 200 words","prompt":zonetheprompt.text.lower(),"url":zoneprompt})

Loading…
Cancel
Save