A simple bash script, runable in windows via gitbash which makes use of wget to backup a private/restricted media wiki - for example on miraheze.org.
In windows, install
- gitbash
- wget
- Download
wget.exe
(32 or 64-bit) toC:\Program Files\Git\mingw64\bin\wget.exe
(ensure the file is named "wget.exe")
- Download
- Chrome browser
This should run natively in linux.
- Log into your restricted wiki using Chrome
- Open Web Developer tools (Ctrl+Shift+I)
- Click Network tab
- Browse to a restricted page (i.e. any page past the main index e.g. "EMIS")
- In the Developer tools, under "Name", click the document name of the link you clicked e.g. "EMIS"
- A side tab will appear. Click "Headers" tab.
- Within Headers tab, under "Request Headers", copy the "Cookie:" section (including the "Cookie: ")
- Edit backup_media_wiki.sh and change the top variables to your own output folder or media wiki website
- Paste in your cookie information into the script
- Run the backup_media_wiki.sh script in gitbash (drag and drop the script into gitbash and press Enter)