Open TanyaaCJain opened 2 years ago
This issue extends issue #3
The developer should learn the following by the end of this task:
__init__
Create a class with name ScrapedImage which takes an img tag for example,
ScrapedImage
<img src="abc.com/image1" alt="Image extracted from abc.com"/>
It should initiate with data members
url_source
abc.com/image1
alt_text
Image extracted from abc.com
Write a member function has_alt_text
has_alt_text
Write a member function to_representation
to_representation
i want to work on this issue
This issue extends issue #3
Aim
The developer should learn the following by the end of this task:
__init__
__init__
method.Task
Create a class with name
ScrapedImage
which takes an img tag for example,It should initiate with data members
url_source
which would set asabc.com/image1
for the above example.alt_text
which would set asImage extracted from abc.com
for the above example.Write a member function
has_alt_text
alt_text
data member of the class object.Write a member function
to_representation