Apr-10-2018, 08:52 PM
(Apr-10-2018, 06:55 PM)nilamo Wrote:(Apr-10-2018, 06:40 PM)digitalmatic7 Wrote: p.map(scraper, list1)map
will call the function,scraper
, once for each item in the iterable,list1
. It might be a method of a Process Pool, but it works very similarly to map: https://docs.python.org/3/library/functions.html#map
Thanks for the help! I really, really appreciate it. I think I almost have a grasp on it now.
def scraper(url):This is the last part I need some clarification on. url is just some name I made up, yet somehow it cycles through list1 items.
I don't really understand how that happens. Is map passing each individual list item into scraper function, and then it gets named what ever I call it in the function brackets?