Skip to content

Commit

Permalink
Merge pull request #2 from MattyBoy4444/MattyBoy4444-parserphoto-1
Browse files Browse the repository at this point in the history
Parser was not reading in photo data
  • Loading branch information
MattyBoy authored Jan 16, 2019
2 parents 73fe5cd + 800c2c6 commit e6fb640
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions hangouts_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,14 +172,14 @@ def _process_message_attachments(self, attachment_list):
for current_attachment in attachment_list:
embed_item = getattr(current_attachment, "embed_item", None)
if embed_item is not None:
plus_photo = getattr(embed_item, "embeds.PlusPhoto.plus_photo", None)
plus_photo = getattr(embed_item, "plus_photo", None)
if plus_photo is not None:
current_attachment = Attachment()
current_attachment.album_id = self._try_int_attribute(plus_photo, "album_id")
current_attachment.photo_id = self._try_int_attribute(plus_photo, "photo_id")
current_attachment.media_type = getattr(plus_photo, "media_type", None)
current_attachment.original_content_url = getattr(plus_photo, "original_content_url", None)
current_attachment.download_url = getattr(plus_photo, "download_url", None)
current_attachment.download_url = getattr(plus_photo, "url", None)
attachments.append(current_attachment)
return attachments

Expand Down

0 comments on commit e6fb640

Please sign in to comment.