Last modified: 2014-10-22 18:39:43 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T67311, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 65311 - newitem.py - missing -new: generator
newitem.py - missing -new: generator
Status: RESOLVED WORKSFORME
Product: Pywikibot
Classification: Unclassified
Wikidata (Other open bugs)
core-(2.0)
All All
: Unprioritized enhancement
: ---
Assigned To: Pywikipedia bugs
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-05-14 20:39 UTC by JAn Dudík
Modified: 2014-10-22 18:39 UTC (History)
3 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description JAn Dudík 2014-05-14 20:39:39 UTC
It would be very useful running this script for new pages only, like in interwiki.py
Comment 1 JAn Dudík 2014-05-14 20:43:44 UTC
Now I see, there is -newpages parameter. 

But when bot found page which was created on different name and moved to new, crashes
Comment 2 xqt 2014-05-29 16:36:32 UTC
Seems duplicate to bug 65309?
Comment 3 Maarten Dammers 2014-10-22 18:38:08 UTC
>pwb.py newitem.py -lang:nl -newpages

Page age is set to 21 days so only pages created
before 2014-10-01T18:33:46 will be considered.
Last edit is set to 7 days so only pages last edited
before 2014-10-15T18:33:49 will be considered.
Retrieving 50 pages from wikipedia:nl.


>>> Aanvangsstabiliteit <<<
Traceback (most recent call last):
  File "C:\pywikibot\coredev\pwb.py", line 164, in <module>
    run_python_file(fn, argv, argvu)
  File "C:\pywikibot\coredev\pwb.py", line 69, in run_python_file
    exec(compile(source, filename, "exec"), main_mod.__dict__)
  File "C:\pywikibot\coredev\scripts\newitem.py", line 141, in <module>
    main()
  File "C:\pywikibot\coredev\scripts\newitem.py", line 138, in main
    bot.run()
  File "C:\pywikibot\coredev\scripts\newitem.py", line 68, in run
    item = pywikibot.ItemPage.fromPage(page)
  File "C:\pywikibot\coredev\pywikibot\page.py", line 3156, in fromPage
    raise pywikibot.NoPage(i)
pywikibot.exceptions.NoPage: Page [[wikidata:-1]] doesn't exist.
<class 'pywikibot.exceptions.NoPage'>
CRITICAL: Waiting for 1 network thread(s) to finish. Press ctrl-c to abort

Nice, -newpages works, but looks like the bot is completely broken
Comment 4 Maarten Dammers 2014-10-22 18:39:43 UTC
Nevermind, ran the wrong version:

>python2.7 pwb.py newitem.py -lang:nl -newpages

Page age is set to 21 days so only pages created
before 2014-10-01T18:13:15 will be considered.
Last edit is set to 7 days so only pages last edited
before 2014-10-15T18:13:16 will be considered.
Retrieving 50 pages from wikipedia:nl.
Working on u'Aanvangsstabiliteit'
Last edit on [[nl:Aanvangsstabiliteit]] was on 2014-10-22T17:34:46.
Too recent. Skipping.
[[nl:Abbas Bahri]] already has an item: [[wikidata:Q305866]].
[[nl:Abdij Mariawald]] already has an item: [[wikidata:Q334026]].
[[nl:Anything Goes (1936)]] already has an item: [[wikidata:Q2743992]].
Working on u'Audiotricz'
Last edit on [[nl:Audiotricz]] was on 2014-10-22T17:46:47.
Too recent. Skipping.
[[nl:Batrachedra]] already has an item: [[wikidata:Q146795]].
[[nl:Goodall]] already has an item: [[wikidata:Q418363]].
(etc etc etc)

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links