fixed bug with bookmarks url retrieval
This commit is contained in:
parent
8d3e24f443
commit
d48e5c34ef
|
@ -46,7 +46,7 @@ class RafaelBookmarkPlugin:
|
||||||
print(r.json())
|
print(r.json())
|
||||||
|
|
||||||
return self.session.put(f"{self.wiki_url}/api/pages/{self.bookstack_bookmark_id}", json={
|
return self.session.put(f"{self.wiki_url}/api/pages/{self.bookstack_bookmark_id}", json={
|
||||||
"markdown": r.json()['markdown'] + f"\n\n - {update_html}"
|
"markdown": r.json()['markdown'] + f"\n\n {update_html}"
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
|
@ -68,7 +68,9 @@ class RafaelBookmarkPlugin:
|
||||||
|
|
||||||
for ent in update.message.entities:
|
for ent in update.message.entities:
|
||||||
if ent.type == "url":
|
if ent.type == "url":
|
||||||
url = update.message.text[ent.offset:ent.length]
|
print(ent)
|
||||||
|
url = update.message.text[ent.offset:ent.offset+ent.length]
|
||||||
|
print("Found URL: ", url)
|
||||||
try:
|
try:
|
||||||
title = self.get_title(url)
|
title = self.get_title(url)
|
||||||
link = f"[{title}]({url})"
|
link = f"[{title}]({url})"
|
||||||
|
|
Loading…
Reference in New Issue