mirror of https://gitlab.com/bashrc2/epicyon
Image width
parent
caafb4648c
commit
f3c1482e87
|
@ -32,7 +32,7 @@ def removeHtmlTag(htmlStr: str, tag: str) -> str:
|
||||||
|
|
||||||
|
|
||||||
def setHtmlTag(htmlStr: str, tag: str, value: str) -> str:
|
def setHtmlTag(htmlStr: str, tag: str, value: str) -> str:
|
||||||
"""Removes a given tag from a html string
|
"""Sets the value of a given tag from a html string
|
||||||
"""
|
"""
|
||||||
matchStr = ' ' + tag + '="'
|
matchStr = ' ' + tag + '="'
|
||||||
if matchStr not in htmlStr:
|
if matchStr not in htmlStr:
|
||||||
|
|
|
@ -135,7 +135,8 @@ def convertRSStoActivityPub(baseDir: str, httpPrefix: str,
|
||||||
|
|
||||||
# remove image dimensions
|
# remove image dimensions
|
||||||
if '<img' in rssDescription:
|
if '<img' in rssDescription:
|
||||||
rssDescription = setHtmlTag(rssDescription, 'width', '10vw')
|
# set the width of the image
|
||||||
|
rssDescription = setHtmlTag(rssDescription, 'width', '100px')
|
||||||
rssDescription = removeHtmlTag(rssDescription, 'height')
|
rssDescription = removeHtmlTag(rssDescription, 'height')
|
||||||
|
|
||||||
followersOnly = False
|
followersOnly = False
|
||||||
|
|
Loading…
Reference in New Issue