Merge pull request from bog4t/python

fixed exception for posts with no tags
This commit is contained in:
Liam 2022-02-18 21:41:42 +00:00 committed by GitHub
commit 0eff94d29a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -132,8 +132,11 @@ def download(path):
}
# Extact tags
for tag in s.find(class_='tags-row').findAll(class_='tags'):
data['tags'].append(tag.find('a').text)
try:
for tag in s.find(class_='tags-row').findAll(class_='tags'):
data['tags'].append(tag.find('a').text)
except:
pass
# Extract comments
for comment in s.findAll(class_='comment_container'):