[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Can multiple wget processes uses the same cookie file for --load-coo
From: |
Tim Rühsen |
Subject: |
Re: Can multiple wget processes uses the same cookie file for --load-cookies cookie.txt --keep-session-cookies --save-cookies cookie.txt? |
Date: |
Sun, 16 Feb 2020 15:03:10 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.2 |
First of all: never let parallel wget instances work on the same directory.
Regarding your question, wget1: No, wget2: Yes.
To get this working with wget1, I suggest the following steps
1. --load-cookies=cookie.txt
2. --save-cookies=<unique cookie file for each wget process>
3. use a bash script to merge the unique cookie files into one
cookies.txt (e.g. something like 'cat file1 file2 ...|sort -u
>cookies.txt').
Regards, Tim
On 16.02.20 14:14, Peng Yu wrote:
> Hi,
>
> I'd like to use multiple wget processes with the same cookie file. But
> I am afraid multiple write to the same cookie file may end up
> corrupting it. Is the corruption of the cookie file possible? If so,
> is there a way to allow multiple wget processes updating the cookie
> file safely? Thanks.
>
signature.asc
Description: OpenPGP digital signature