mediawiki-client-tools / mediawiki-dump-generator

Python 3 tools for downloading and preserving wikis
https://github.com/mediawiki-client-tools/mediawiki-scraper
GNU General Public License v3.0
87 stars 13 forks source link

Doesn't pass username and password to launcher #207

Closed robkam closed 8 months ago

robkam commented 9 months ago

Describe the Bug

I can dump a private wiki with dumpgenerator but not with launcher.

Expected Behavior

$ grep -Ec "<title(.*?)>" *.xml;grep -Ec "<page(.*?)>" *.xml;grep -Ec "</page>" *.xml;grep -Ec "<revision(.*?)>" *.xml;grep -Ec "</revision>" *.xml
4202
4202
4202
7956
7956

Actual Behavior

Command for Reproducing the Bug

$ launcher path-to-apis.txt

File path-to-apis.txt contains the line

https://scruffy.miraheze.org/w/api.php --generator-arg=--user USER --pass PASSWORD

Output

stdout ```bash Reading list of APIs from path-to-apis.txt 1 APIs found ######################################################################### # Downloading https://scruffy.miraheze.org/w/api.php --generator-arg=--user USER --pass PASSWORD ######################################################################### Checking API... https://scruffy.miraheze.org/w/api.php --generator-arg=--user USER --pass PASSWORD MediaWiki API seems to work but returned no index URL API is OK: https://scruffy.miraheze.org/w/api.php --generator-arg=--user USER --pass PASSWORD Checking index.php... https://scruffy.miraheze.org/w/index.php ERROR: This wiki requires login and we are not authenticated Error in index.php. Please, provide a correct path to index.php or use --xmlrevisions. Terminating. ```
errors.log ```text ```

Platform Details

Desktop

Additional Context

robkam commented 8 months ago

I was putting the --generator-arg=--user USER --pass PASSWORD in the text file when it should have gone on the command line. This works: launcher path-to-apis.txt -g=--user -g=USER -g=--pass -g=PASSWORD