~jonjfineman/rssFeed

3b9e443005e9cdc775a45a7e919c69b0805fff05 — Jon Fineman a month ago 0b37a44 master
track npr url change
1 files changed, 4 insertions(+), 6 deletions(-)

M rssFeed.py
M rssFeed.py => rssFeed.py +4 -6
@@ 303,9 303,9 @@ for rss in rssList['list']:
				messageBody += '<p>Summary:</p>'
				messageBody += '<p>' + str(description) + '</p>'
				content_value = description
				story_url = str(link).replace("npr.org", "text.npr.org")
				story_url = str(link).replace("www.npr.org", "text.npr.org")
				if DEBUG == True:
					print('\n\n**** regx:\n', str(link).replace("npr.org", "text.npr.org"))
					print('\n\n**** regx:\n', str(link).replace("www.npr.org", "text.npr.org"))
					print('\n\n**** html story url:\n', str(link))
					print('\n\n**** text story url:\n', story_url)
				try:


@@ 463,8 463,7 @@ for rss in rssList['list']:
		messageText += "\n" + summary + "\n\n"
		# see if we can swap url for a lite version
		# @TODO make configureable
		messageText = messageText.replace("npr.org", "text.npr.org", 1)
		### messageText = messageText.replace("www.npr.org", "text.npr.org", 1)
		messageText = messageText.replace("www.npr.org", "text.npr.org", 1)
		### messageText = messageText.replace("www.reddit.com", "i.reddit.com")
		if DEBUG == True:
			print('\n\n**** text msg:\n', messageText)


@@ 488,8 487,7 @@ for rss in rssList['list']:
		messageHTML += '</html>'
		# see if we can swap url for a lite version
		# @TODO make configureable
		messageHTML = messageHTML.replace("npr.org", "text.npr.org", 2)
		### messageHTML = messageHTML.replace("www.npr.org", "text.npr.org", 2)
		messageHTML = messageHTML.replace("www.npr.org", "text.npr.org", 2)
		messageHTML = messageHTML.replace("www.reddit.com", "i.reddit.com")
		if DEBUG == True:
			print('\n\n**** html msg:\n', messageHTML)