Zapier script for script kiddies.
Last active
April 8, 2023 21:15
-
-
Save empeje/2ee9b44d0e20839ea205730e089f81c4 to your computer and use it in GitHub Desktop.
Zapier
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
response = requests.get('https://newsletter.banklesshq.com/feed') | |
response.raise_for_status() # optional but good practice in case the call fails! | |
from xml.etree import ElementTree | |
root = ElementTree.fromstring(response.text) | |
content = "" | |
# Looks for all item elements under channel tag | |
for item in root.iterfind('channel/item'): | |
title = item.findtext('title') | |
description = item.findtext('description') | |
date = item.findtext('pubDate') | |
link = item.findtext('link') | |
header = ('%s / %s / %s \n' %(title, date, description)) | |
content += header | |
output = { content: content } | |
print(content) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment