Question: I need to write code on python 3 (can use only json and csv librarys) I have 4 html files (first.html , second.html , third.html,

I need to write code on python 3 (can use only json and csv librarys) I have 4 html files (first.html , second.html , third.html, fourth.html) with hyperlinks inside. Inside first.html I have link second.html, that opens second.html file and link third.html , that open third.html. second.html dont have links inside. third.html have links first.html that open first.html and fourth.html that open fourth.html . fourth.html have link first.html that open first.html. need to write smth like crawler that checks all files and links inside and put it in dictionary. dictionary, where keys is names of file and values are name of links inside. for example, the dictionary might be like: {'first.html': ['second.html', 'third.html'], 'second.html': [], 'third.html': ['first.html', 'fourth.html'], 'fourth.html': ['first.html']}

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!