Subido por Cindy Juarez

if

Anuncio
if y.media_thumb: y.media_thumb = base64.b64encode(y.media_thumb).decode("utf# Start if Clause # GPS if y.latitude and y.longitude: content_type = CONTENT_GPS # MEDIA elif y.media_url: if y.media_thumb: content_type = CONTENT_MEDIA_THUMB else: content_type = CONTENT_MEDIA_NOTHUMB # TEXT elif y.msg_text is not None: content_type = CONTENT_TEXT # End if Clause # row class selection if content_type == CONTENT_NEWGROUPNAME: wfile.write('<tr class="newgroupname">\n'.encode('utf-8')) elif y.from_me == 1: wfile.write('<tr class="me">\n'.encode('utf-8')) else: wfile.write('<tr class="other">\n'.encode('utf-8')) message: chat name # get corresponding contact name for the contact_from of this if y.contact_from != "me": if y.contact_from == i.contact_id: #if sender is identical to y.contact_from = contactname else: # for group chats for n in chat_session_list: if n.contact_id == y.contact_from: y.contact_from = convertsmileys ( n.contact_name ) # PK wfile.write('<td>{}</td>\n'.format(y.pk_msg).encode('utf-8')) # Chat name wfile.write('<td class="contact">{}</td>\ n'.format(contactname).encode('utf-8'))
# Msg date wfile.write('<td>{}</td>\n'.format(str(y.msg_date).replace(" "," ")).encode('utf-8')) # From wfile.write('<td class="contact">{}</td>\ n'.format(y.contact_from).encode('utf-8')) # date elaboration for further use date = str(y.msg_date)[:10] if date != 'N/A': date = int(date.replace("-","")) # Display Msg content (Text/Media) media size if content_type == CONTENT_IMAGE: #Search for offline file with current date (+2 days) and known linkimage = findfile ("IMG", y.media_size, y.local_url, date, 2) try: wfile.write('<td class="text"><a onclick="image(this.href);return(false);" target="image" href="{}"><img
Descargar