thecodingmortals / on-page-seo-analyzer

MIT License
1 stars 1 forks source link

Class for Image Scraping #6

Open TanyaaCJain opened 2 years ago

TanyaaCJain commented 2 years ago

This issue extends issue #3

Aim

The developer should learn the following by the end of this task:

Task

Create a class with name ScrapedImage which takes an img tag for example,

<img src="abc.com/image1" alt="Image extracted from abc.com"/>

It should initiate with data members

  1. Write a member function has_alt_text

    • check if a value exists in alt_text data member of the class object.
    • Return a bool value where True is returned if there is an alt text present for the given image.
  2. Write a member function to_representation

    • Return a dictionary object that returns a key value pair of all the data members set in the class along with their values.
Shailenderg commented 2 years ago

i want to work on this issue