Python Forum
Problem With Simple Multiprocessing Script
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Problem With Simple Multiprocessing Script
#6
(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?
Reply


Messages In This Thread
RE: Problem With Simple Multiprocessing Script - by digitalmatic7 - Apr-10-2018, 08:52 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Simple flask rest api problem cancerboi 4 2,959 Jan-29-2020, 03:10 PM
Last Post: brighteningeyes
  requests problem in python script "content type" abdlwafitahiri 4 3,378 Dec-29-2019, 02:29 PM
Last Post: abdlwafitahiri
  "I'm Feeling Lucky" script problem (again) tab_lo_lo 7 8,031 Jul-23-2019, 11:26 PM
Last Post: snippsat
  Need Help with Simple Text Reformatting Problem MattTuck 5 3,916 Aug-14-2017, 10:07 PM
Last Post: MattTuck

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020