download and save the comic image to the hard drive with iter_content(find the url of the previous comic linkand repeat open new file editor tab and save it as downloadxkcd py step design the program if you open the browser' developer tools and inspect the elements on the pageyou'll find the followingthe url of the comic' image file is given by the href attribute of an element the element is inside element the prev button has rel html attribute with the value prev the first comic' prev button links to the indicating that there are no more previous pages make your code look like the following#python downloadxkcd py downloads every single xkcd comic import requestsosbs url 'os makedirs('xkcd'exist_ok=truewhile not url endswith('#')tododownload the page starting url store comics in /xkcd todofind the url of the comic image tododownload the image todosave the image to /xkcd todoget the prev button' url print('done 'you'll have url variable that starts with the value 'and repeatedly update it (in for loopwith the url of the current page' prev link at every step in the loopyou'll download the comic at url you'll know to end the loop when url ends with '#you will download the image files to folder in the current working directory named xkcd the call os makedirs(ensures that this folder existsand the exist_ok=true keyword argument prevents the function from web scraping