Update metadata exception types to catch TypeErrors #19
Loading…
Reference in a new issue
No description provided.
Delete branch "update-metadata-exceptions"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The changes introduced in
3c3b580496
caughtNameError
s on the metadata fields (post IDs, tags), but didn't account for if the <script> tags that contain them weren't found at all.In that case, BeautifulSoup returns a
None
type, which when we then try to access the tag's attributes. This PR fixes that by addingTypeError
to the excepts.Update metadata exception types to catch multiple potential errorsto Update metadata exception types to catch TypeErrors