Home>

Images were acquired by scraping, but the following values ​​were acquired without being able to acquire from the middle.

img = ranking.find_element_by_tag_name ('img'). get_attribute ('src')
data: image/gif;base64, R0lGODlhAQABAIAAAAAAAP /// yH5BAEAAAAALAAAAAABAAEAAAIBRAA7

I checked it, but I couldn't understand it and couldn't solve it.

  • Answer # 1

    (wikipedia) Data URI scheme

    data: image/gif;base64, R0 .....
    The gif image is embedded in base64 format as it is after,.
    Decode,and later with base64 and save to a file.

      

    I have researched it, but I can't understand it

    (google.com) img + src + data will come out immediately.

    I don't know if I can understand this answer
    I think it would be good if you asked what you were looking at and what you couldn't understand.

  • Answer # 2

    There may be multiple elements of ranking.find_element_by_tag_name ('img'), depending on the page.

    Check the number of elements with len (ranking.find_elements_by_tag_name ('img')), then
    I think it's a good idea to find out what number you need.