Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

I need to write code on python (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']}

html files: first.html p1 2 3

second.html p1

third.html p1 1 4

fourth.html p1 1

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Systems A Practical Approach To Design Implementation And Management

Authors: THOMAS CONNOLLY

6th Edition

9353438918, 978-9353438913

More Books

Students also viewed these Databases questions