Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parser was not reading in photo data #2

Merged
merged 1 commit into from
Jan 16, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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