- May 31, 2019
- 344
- 337
- 63
- AGName
- -=FamilyGuy=-
- AG Join Date
- March 3, 2007
If, like myself, you've been pretty active in private conversations on AG, you might have tens of pages of conversations, some of them with tens of pages of comments in them. That's potentially many thousands of replies. Some very important information and files might be in that mess, and you might feel anxious about loosing them forever. Xenforo doesn't allow to backup your PMs, probably so someone can sell an add-on that does it, but fear not, everything that you can access can be backed up.
Instead of copying thousands of posts by hand, and still miss the deadline, here's a mostly automated procedure. It could easily be adapted to backup your own favorite threads/PMs too if you want a personal backup of a few things.
********
You'll need to use the WGET, FIND, and SED programs. They should be easy to obtain on Linux and MacOS. Windows users might have to look into cygwin, Windows subsystem for Linux, or alternatives. Just google it.™
When you click on an attachment, it'll open a basic file browsing page with an index.html file, that file is actually your attachment; right-click, save as, choose a proper filename/extension.
Good luck!
Here's the script I tested on Linux, worked fine for myself. It took a few hours to scrape everything and my backup ended up being around 600 MB, 60 MB compressed.
Instead of copying thousands of posts by hand, and still miss the deadline, here's a mostly automated procedure. It could easily be adapted to backup your own favorite threads/PMs too if you want a personal backup of a few things.
********
You'll need to use the WGET, FIND, and SED programs. They should be easy to obtain on Linux and MacOS. Windows users might have to look into cygwin, Windows subsystem for Linux, or alternatives. Just google it.™
- Install Firefox and the export cookies addon: https://addons.mozilla.org/firefox/addon/export-cookies-txt/
- Log in into AG, making sure to tick "stay logged in". Use the addon to export the cookies for AG to a text file, mine is called "cookies-assemblergames-com.txt".
- Create a new folder, place the cookies file inside and open a console/terminal in the same folder.
- Run the following command:
wget -mkEpnp --execute robots=off --load-cookies=cookies-assemblergames-com.txt https://assemblergames.com/conversations/
- WAIT!
- Rename the newly created "assemblergames.com" folder to A.
- Run the following command:
wget -mkEp --execute robots=off -I/attachments/ -I/data/ -I/conversations --load-cookies=cookies-assemblergames-com.txt https://assemblergames.com/conversations/
- WAIT SOME MORE!
- Rename the folder "assemblergames.com" to B.
- Create a third folder called Final, copy the content of B to it.
- Copy the content of A over Final, overwriting/merging everything that was already there from B.
- Change the _bH variable to ./ (current dir) in every html files. In linux and probably OSX:
find ./Final -type f -exec sed -i -e 's/_bH = "https:\/\/assemblergames\.com\/";/".\/"/g' {} \;
- Fix links of attachments:
find ./Final/conversations/ -type f -exec sed -i -e 's/"https:\/\/assemblergames\.com\/attachments\//"\.\.\/\.\.\/attachments\//g' {} \;
- Profits $$$
- Like and subscribe!
When you click on an attachment, it'll open a basic file browsing page with an index.html file, that file is actually your attachment; right-click, save as, choose a proper filename/extension.
Good luck!
Here's the script I tested on Linux, worked fine for myself. It took a few hours to scrape everything and my backup ended up being around 600 MB, 60 MB compressed.
Code:
#!/bin/bash
wget -mkEpnp --execute robots=off --load-cookies=cookies-assemblergames-com.txt https://assemblergames.com/conversations/
mv "assemblergames.com" A
wget -mkEp --execute robots=off -I/attachments/ -I/data/ -I/conversations --load-cookies=cookies-assemblergames-com.txt https://assemblergames.com/conversations/
mv "assemblergames.com" B
mkdir Final
cp -rf B/* Final/
cp -rf A/* Final/
find ./Final -type f -exec sed -i -e 's/_bH = "https:\/\/assemblergames\.com\/";/".\/"/g' {} \;
find ./Final/conversations/ -type f -exec sed -i -e 's/"https:\/\/assemblergames\.com\/attachments\//"\.\.\/\.\.\/attachments\//g' {} \;
Last edited: