Skip to content
Advertisement

Web-scraper process

I’ve been trying to replace some text in my output but i’ve had no luck.

I want the output to look something like this

JavaScript

The url_list variable returns:

JavaScript

This is what I have tried:

JavaScript

but I still get it with 500w on the end.

And since I want to get every link in a single line without the [''] I tried to split it with .split('n'), instead of .split(',') but it seems i get an error too when I use that.

Here is the rest of the code:

JavaScript

Advertisement

Answer

I recommend to use dictionary to store image URLS. The keys are source of the image and values are lists of image URLs. For example:

JavaScript

Prints:

JavaScript
User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement