Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- urbanecm@tools-bastion-02 ~/Documents/cswiki/addPrekladCT
- $ cat pages.txt
- Battle_of_San_Patricio
- Heritage_Foundation
- Jan_Christian_Smuts
- Makronky
- Start_Linuxového_systému
- Stephen_Marley
- urbanecm@tools-bastion-02 ~/Documents/cswiki/addPrekladCT
- $ cat runAddMissing.sh
- #!/bin/bash
- python3 addmissing.py -file:pages.txt -search:'-insource:/\{\{[Pp]řeklad/'
- urbanecm@tools-bastion-02 ~/Documents/cswiki/addPrekladCT
- $ bash runAddMissing.sh
- Retrieving 50 pages from wikipedia:cs.
- WARNING: Page "Battle of San Patricio" on wikipedia:cs is skipped because it is a redirect
- WARNING: Page "Heritage Foundation" on wikipedia:cs is skipped because it is a redirect
- WARNING: Page "Jan Christian Smuts" on wikipedia:cs is skipped because it is a redirect
- WARNING: Page "Makronky" on wikipedia:cs is skipped because it is a redirect
- WARNING: Page "Start Linuxového systému" on wikipedia:cs is skipped because it is a redirect
- >>> Stephen Marley <<<
- No changes were needed on [[Stephen Marley]]
- >>> 1. slovenská fotbalová liga <<<
- 6 pages read
- 0 pages written
- Execution time: 7 seconds
- Read operation time: 1 seconds
- Script terminated by exception:
- ERROR: KeyError: '1._slovenská_fotbalová_liga'
- Traceback (most recent call last):
- File "addmissing.py", line 223, in <module>
- main()
- File "addmissing.py", line 216, in main
- bot.run() # guess what it does
- File "/shared/pywikipedia/core/pywikibot/bot.py", line 1434, in run
- self.treat(page)
- File "/shared/pywikipedia/core/pywikibot/bot.py", line 1721, in treat
- super(ExistingPageBot, self).treat(page)
- File "/shared/pywikipedia/core/pywikibot/bot.py", line 1785, in treat
- super(NoRedirectPageBot, self).treat(page)
- File "/shared/pywikipedia/core/pywikibot/bot.py", line 1648, in treat
- self.treat_page()
- File "addmissing.py", line 153, in treat_page
- preklad = nahrady[self.current_page.title(underscore=True)]
- KeyError: '1._slovenská_fotbalová_liga'
- <class 'KeyError'>
- CRITICAL: Closing network session.
- urbanecm@tools-bastion-02 ~/Documents/cswiki/addPrekladCT
- $ cat preklads.txt
- Battle_of_San_Patricio {{Překlad|en|Battle of San Patricio|681532466}}
- Makronky {{Překlad|en|Macaron|702131015}}
- Stephen_Marley {{Překlad|en|Stephen Marley (musician)|705380410}}
- Jan_Christian_Smuts {{Překlad|en|Jan Smuts|711517191}}
- Heritage_Foundation {{Překlad|en|The Heritage Foundation|723858589}}
- Start_Linuxového_systému {{Překlad|en|Linux startup process|725173832}}
- urbanecm@tools-bastion-02 ~/Documents/cswiki/addPrekladCT
- $
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement