regex fix
This commit is contained in:
parent
e804c549e5
commit
550493cfe1
|
@ -40,7 +40,9 @@ def daemon():
|
||||||
title: str = str(a.find('title')).replace("<title>", "").replace("</title>", "")
|
title: str = str(a.find('title')).replace("<title>", "").replace("</title>", "")
|
||||||
desc: str = str(a.find('description')).replace("<description>", "").replace("</description>", "")
|
desc: str = str(a.find('description')).replace("<description>", "").replace("</description>", "")
|
||||||
link: str = str(a.find('enclosure'))
|
link: str = str(a.find('enclosure'))
|
||||||
link = re.sub(r"<.*>", "", link)
|
link_pot = re.findall(r'https.*?mp3', link)
|
||||||
|
if link_pot is not None:
|
||||||
|
link = link_pot[0]
|
||||||
dur: str = str(a.find('duration')).replace("<duration>", "").replace("</duration>", "")
|
dur: str = str(a.find('duration')).replace("<duration>", "").replace("</duration>", "")
|
||||||
pub: str = str(a.find('pubDate')).replace("<pubDate>", "").replace("</pubDate>", "")
|
pub: str = str(a.find('pubDate')).replace("<pubDate>", "").replace("</pubDate>", "")
|
||||||
article = {
|
article = {
|
||||||
|
|
Loading…
Reference in New Issue