[Solved] Multi-tasking with Multiprocessing or Threading or Asyncio, depending on the Scenario

So off the top of my head you can look at 2 things. 1) Asyncio (be careful this example uses threading and is not thread safe specifically the function asyncio.gather) import asyncio for work in [1,2,3,4,5]: tasks.append(method_to_be_called(work)) results = await asyncio.gather(*tasks) 2) Asyncio + multiprocessing https://github.com/jreese/aiomultiprocess 1 solved Multi-tasking with Multiprocessing or Threading or Asyncio, … Read more

[Solved] What request should I make to get the followers list from a specific profile page

Try this: import time import requests link = ‘https://api-mainnet.rarible.com/marketplace/api/v4/followers’ params = {‘user’: ‘0xe744d23107c9c98df5311ff8c1c8637ec3ecf9f3’} payload = {“size”: 20} with requests.Session() as s: s.headers[‘User-Agent’] = ‘Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.150 Safari/537.36’ res = s.post(link,params=params,json=payload) for item in res.json(): print(item[‘owner’][‘name’]) 1 solved What request should I make to get the followers list from a … Read more