Python - Webscraping: Fails to get single item from dictionary

Viewed 23

I have a script that adds (scrapes) links to a dictionary, then scrapes for each of theses links individually:


It gives me the error: requests.exceptions.InvalidSchema: No connection adapters were found for "['link1, link2, link3 ']", whereby instead of link1 the urls are printed, i just dont write them here for readability. Why does my script fail to use each dict item individually and tries to connect to the whole dict instead?

1 Answers

I think your issue is in the line links.append(result)

You want

links.extend(result)

Related