- Entferne Debugging-Output
- Entferne www. im Link-Namen - Nutze Feedburner-Username bei Feedburner-Links
This commit is contained in:
parent
0ff81190b1
commit
644d23b576
6
bot.py
6
bot.py
@ -281,7 +281,6 @@ def check_rss(bot, job):
|
|||||||
newentr = get_new_entries(last, feed_data.entries)
|
newentr = get_new_entries(last, feed_data.entries)
|
||||||
text = ''
|
text = ''
|
||||||
for k2, v2 in enumerate(newentr):
|
for k2, v2 in enumerate(newentr):
|
||||||
print(newentr)
|
|
||||||
if not 'title' in v2:
|
if not 'title' in v2:
|
||||||
title = 'Kein Titel'
|
title = 'Kein Titel'
|
||||||
else:
|
else:
|
||||||
@ -291,7 +290,12 @@ def check_rss(bot, job):
|
|||||||
link_name = link
|
link_name = link
|
||||||
else:
|
else:
|
||||||
link = v2.link
|
link = v2.link
|
||||||
|
f = re.search('^https?://feedproxy\.google\.com/~r/(.+?)/.*', link) # feedproxy.google.com
|
||||||
|
if f:
|
||||||
|
link_name = f.group(1)
|
||||||
|
else:
|
||||||
link_name = urlparse(link).netloc
|
link_name = urlparse(link).netloc
|
||||||
|
link_name = re.sub('^www\d?\.', '', link_name) # www.
|
||||||
if 'content' in v2:
|
if 'content' in v2:
|
||||||
content = cleanRSS(v2.content[0].value)
|
content = cleanRSS(v2.content[0].value)
|
||||||
content = remove_tags(content).lstrip()
|
content = remove_tags(content).lstrip()
|
||||||
|
Reference in New Issue
Block a user