I have to scrap a page in a site to which I have to post a parameter, but I have an array of value to request the same page. I don't want to scrap the page for each value of the array sequentially . I want to scrap it parallel(that means search "google.com/query=a" and search "google.com/query=b" I would like to run this two request parallel(for now I cant able to run because of the site login restriction which is like the below. The problem is the site allows only login session per account at a time, that means if the account is logged in through a browser then if we try to log in again with any other browser(incognito mode) the logged in session will be logged out.
for now, I guess there are two possibilities, first, I should be able to keep the cookie values saved in a file once logged in so that I can use the same cookie when the same spider runs with different parameter.But I tried to set Cookie but the cookie is not setting to the request properly. so request failed .(if I can save the cookie and can manually set to the request then i thought to run the spider using scrapyd with different param value)
second one: when I request that page i have to scrap the page parallel through multiprocessing or Parallel using python default libraries.
But as I see some posts multiprocessing is not good while scraping they suggested.
does anyone has any idea related to this or can save a cookie to use it for next instance of spider? I can update all the code tried but it will be so huge so waiting for someone help based on that I can update with what I have tried.