Traceback (most recent call last):
File "/usr/local/lib/python3.10/dist-packages/feedparser/util.py", line 156, in __getattr__
return self.__getitem__(key)
File "/usr/local/lib/python3.10/dist-packages/feedparser/util.py", line 113, in __getitem__
return dict.__getitem__(self, key)
KeyError: 'summary'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/justin/patreon-mp3-master/patreon-mp3.py", line 64, in <module>
comment = item.summary.replace('<br>','').strip()
File "/usr/local/lib/python3.10/dist-packages/feedparser/util.py", line 158, in __getattr__
raise AttributeError("object has no attribute '%s'" % key)
AttributeError: object has no attribute 'summary'
fixed by putting a try around comment = item.summary.replace('<br>','').strip()
then had issue where datetime.mktime is no longer a method, fixed by passing published as a struct_time to time.mktime
Script would die when no summary:
fixed by putting a try around
comment = item.summary.replace('<br>','').strip()
then had issue where datetime.mktime is no longer a method, fixed by passing published as a struct_time to time.mktime