title: How to solve catch image and emoji in web crawler using selenium
body: <p>I want to ask some questions.</p>
  
  <p>I am using Python 3.7.6, web driver and selenium to do web crawler</p>
  
  <p>And then, I used Visual Studio Code to finish my web crawler, and I output a csv file. </p>
  
  <p>I used "find_elements_by_xpath" to catch some information. The following image is my part code:</p>
  
  <pre><code>from datetime import date,datetime
  from selenium import webdriver #載入webdriver
  from selenium.webdriver.common.keys import Keys #載入按鍵
  from bs4 import BeautifulSoup #載入BeautifulSoup工具
  from selenium.webdriver.support.ui import Select
  from selenium.common.exceptions import NoSuchElementException
  import numpy as np
  import xlrd
  import csv
  import codecs
  import time
  
  data = xlrd.open_workbook('B.xlsx')
  table = data.sheets()[0]
  print(table)
  nrows = table.nrows 
  ncols = table.ncols 
  print(ncols)
  print(nrows)
  for i in range(1,nrows):
      csv_post="Post_No_" + str(i) + ".csv"
      with open(csv_post, 'a', newline='', encoding="utf-8") as csvfile:
          writer = csv.writer(csvfile)
          writer.writerow(['互動作者','發表時間','互動內容'])
      print_link = table.cell_value(i,3)
      print(i)
      print(print_link)
      driver_blank=webdriver.Chrome('./chromedriver') #使用chrome作為爬蟲輔助工具，把chromedriver載入進來
      driver_blank.get(print_link)
      time.sleep(1)
      post_page_count  = len(driver_blank.find_elements_by_xpath("/html/body/form/div[5]/div/div/div[2]/div[1]/div[4]/div[2]/div[2]/select/option"))
  
      if(post_page_count != 0):
          try_value=1
          while(try_value):
              try:
                  driver_blank.find_element_by_xpath("/html/body/form/div[5]/div/div/div[2]/div[1]/div[5]/table[2]")
                  print("測試顯示正常")
                  try_value=0
              except NoSuchElementException as e:
                  print("測試顯示異常，現正刷新網頁")
                  driver_blank.refresh()
                  time.sleep(10)
          print("總頁數："+str(post_page_count))
          table_rows=len(driver_blank.find_elements_by_xpath("/html/body/form/div[5]/div/div/div[2]/div[1]/div[5]/table"))
          print("共有"+str(table_rows)+"個Table")
  
          real_table_rows=table_rows+1
  
          #only 1
          post_author = driver_blank.find_element_by_xpath("/html/body/form/div[5]/div/div/div[2]/div[1]/div[5]/table[1]/tbody/tr[2]/td[1]/a")
          post_content = driver_blank.find_element_by_xpath("/html/body/form/div[5]/div/div/div[2]/div[1]/div[5]/table[1]/tbody/tr[2]/td[2]/table/tbody/tr[1]/td/div")
          post_time = driver_blank.find_element_by_xpath("/html/body/form/div[5]/div/div/div[2]/div[1]/div[5]/table[1]/tbody/tr[2]/td[2]/table/tbody/tr[4]/td/div[2]/span")
          print("互動作者："+post_author.text)
          print("互動內容：")
          print(post_content.text)
          print("發表時間："+post_time.text)
          print("&lt;&lt;&lt; --- &gt;&gt;&gt;")
          with open(csv_post, 'a', newline='', encoding="utf-8") as csvfile:
              writer = csv.writer(csvfile)
              writer.writerow([post_author.text,post_time.text,post_content.text])
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/zNQEa.jpg" rel="nofollow noreferrer">enter image description here</a></p>
  
  <p>The following is the forum post: (<a href="https://forumd.hkgolden.com/view.aspx?type=MB&amp;message=7197409" rel="nofollow noreferrer">https://forumd.hkgolden.com/view.aspx?type=MB&amp;message=7197409</a>)</p>
  
  <p><a href="https://i.stack.imgur.com/A1C51.jpg" rel="nofollow noreferrer">enter image description here</a></p>
  
  <p>I want to catch text, emoji, and image. 
  I can catch only the text, but I cannot catch emoji and image. 
  I don't know what to do. Can anyone help me? Thank you.</p>