WikiTeam / wikiteam

Tools for downloading and preserving wikis. We archive wikis, from Wikipedia to tiniest wikis. As of 2023, WikiTeam has preserved more than 350,000 wikis.
https://github.com/WikiTeam
GNU General Public License v3.0
705 stars 147 forks source link

Use the same requests session for getting the wiki engine and checking API/index #444

Closed Pokechu22 closed 1 year ago

Pokechu22 commented 1 year ago

Needed for https://geck.bethsoft.com/ (along with cookies.txt containing the __cf_bm cookie), or else the site isn't detected as mediawiki at all. This is a bit of a follow-up to #441. I also updated the user-agent (I didn't test if this is actually needed, but there's no real harm in using a modern Firefox UA).

nemobis commented 1 year ago

Makes sense to be consistent, assuming failure/success is the same for these calls and for the actual dumping later.