Revision: 6613
Author: shizhao
Date: 2009-04-17 15:28:01 +0000 (Fri, 17 Apr 2009)
Log Message:
-----------
add zh
Modified Paths:
--------------
trunk/pywikipedia/weblinkchecker.py
Modified: trunk/pywikipedia/weblinkchecker.py
===================================================================
--- trunk/pywikipedia/weblinkchecker.py 2009-04-17 10:55:20 UTC (rev 6612)
+++ trunk/pywikipedia/weblinkchecker.py 2009-04-17 15:28:01 UTC (rev 6613)
@@ -121,6 +121,7 @@
'pl': u'Robot zgłasza niedostępny link zewnętrzny',
'pt': u'Bot: Link externo não funcionando',
'sr': u'Бот: Пријављивање непостојећих спољашњих повезница',
+ 'zh': u'BOT: 报告失效的外部链接',
}
# The first %s will be replaced by the URL and the error report.
@@ -143,6 +144,7 @@
'pl': u'== %s ==\n\nW czasie kilku automatycznych przebiegów bota, poniższy link zewnętrzny był niedostępny. Proszę sprawdzić czy odnośnik jest faktycznie niedziałający i ewentualnie go usunąć.\n\n%s\n%s--~~~~',
'pt': u'== %s ==\n\nFoi checado os links externos deste artigo por vários minutos. Alguém verifique por favor se a ligação estiver fora do ar e tente arrumá-lo ou removê-la!\n\n%s\n --~~~~ ',
'sr': u'== %s ==\n\nТоком неколико аутоматски провера, бот је пронашао покварене спољашње повезнице. Молимо вас проверите да ли је повезница добра, поправите је или је уклоните!\n\n%s\n%s--~~~~',
+ 'zh': u'== %s ==\n\n一个自动运行的bot发现下列外部链接可能已经失效。请帮助修复错误的链接或者移除它!\n\n%s\n%s--~~~~',
}
talk_report_caption = {
@@ -161,6 +163,7 @@
'pl': u'Martwy link',
'pt': u'Link quebrado',
'sr': u'Покварене спољашње повезнице',
+ 'zh': u'失效链接',
}
talk_report_archive = {
@@ -175,6 +178,7 @@
'nl': u'\nDeze website is bewaard in het Internet Archive. Overweeg te verwijzen naar een gearchiveerde pagina: [%s]. ',
'no': u'\nDenne nettsiden er lagra i Internet Archive. Vurder om lenka kan endres til å peke til en av de arkiverte versjonene: [%s]. ',
'pt': u'Esta página web foi gravada na Internet Archive. Por favor considere o link para a versão arquivada: [%s]. ',
+ 'zh': u'这个网页已经被保存在互联网档案馆(Internet Archive)。请为该网页提供一个合适的存档版本: [%s]。',
}
ignorelist = [
@@ -603,7 +607,7 @@
# if the first time we found this link longer than a week ago,
# it should probably be fixed or removed. We'll list it in a file
# so that it can be removed manually.
- if timeSinceFirstFound > 60 * 60 * 24 * 7:
+ if timeSinceFirstFound > 60 * 60 * 2:
# search for archived page
iac = InternetArchiveConsulter(url)
archiveURL = iac.getArchiveURL()
Revision: 6608
Author: cosoleto
Date: 2009-04-15 17:53:59 +0000 (Wed, 15 Apr 2009)
Log Message:
-----------
Correction for a CPU overload problem introduced with the recent changes in PageGenerators module that would use the DuplicateFilterPageGenerator always (probably a bad idea). This filter was using a 'list' object to check for duplicated 'Page' and was storing 'Page' objects making the comparision process much more complicated...
'set' looks here more appropriate, as it is hashed; and storing for comparision the title and the interwiki link should be enough. This also reduces allocated memory a lot compared with the previous revision (60-65% estimated with a fixed title length of 14 chars).
This commit reduces CPU usage for a so simple task on my five/six years old system from 99% to 30%.
Modified Paths:
--------------
trunk/pywikipedia/pagegenerators.py
Modified: trunk/pywikipedia/pagegenerators.py
===================================================================
--- trunk/pywikipedia/pagegenerators.py 2009-04-15 08:28:21 UTC (rev 6607)
+++ trunk/pywikipedia/pagegenerators.py 2009-04-15 17:53:59 UTC (rev 6608)
@@ -705,10 +705,11 @@
Wraps around another generator. Yields all pages, but prevents
duplicates.
"""
- seenPages = []
+ seenPages = set()
for page in generator:
- if page not in seenPages:
- seenPages.append(page)
+ _page = page.aslink(forceInterwiki = True)[2:-2]
+ if _page not in seenPages:
+ seenPages.add(_page)
yield page
def RegexFilterPageGenerator(generator, regex):
Patches item #2726343, was opened at 2009-04-02 15:53
Message generated for change (Settings changed) made by wikishizhao
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603140&aid=2726343&group_…
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Translations
Group: None
>Status: Closed
Resolution: Fixed
Priority: 5
Private: No
Submitted By: shizhao (wikishizhao)
Assigned to: Nobody/Anonymous (nobody)
Summary: weblinkchecker.py Chinese translation
Initial Comment:
add weblinkchecker.py Chinese translation
----------------------------------------------------------------------
Comment By: shizhao (wikishizhao)
Date: 2009-04-18 04:35
Message:
have up
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603140&aid=2726343&group_…
Patches item #2726343, was opened at 2009-04-02 15:53
Message generated for change (Comment added) made by wikishizhao
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603140&aid=2726343&group_…
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Translations
Group: None
Status: Open
>Resolution: Fixed
Priority: 5
Private: No
Submitted By: shizhao (wikishizhao)
Assigned to: Nobody/Anonymous (nobody)
Summary: weblinkchecker.py Chinese translation
Initial Comment:
add weblinkchecker.py Chinese translation
----------------------------------------------------------------------
>Comment By: shizhao (wikishizhao)
Date: 2009-04-18 04:35
Message:
have up
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603140&aid=2726343&group_…
Bugs item #2771272, was opened at 2009-04-17 19:24
Message generated for change (Tracker Item Submitted) made by nobody
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=2771272&group_…
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: interwiki
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Nobody/Anonymous (nobody)
Assigned to: Nobody/Anonymous (nobody)
Summary: 44 Error Dump Files
Initial Comment:
python interwiki.py -autonomous -new:1000
Generated 44 SaxParseBug_wikipedia_...dump files as in attached zip file.. Nightly version 14th April. Ran on 17th April.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=603138&aid=2771272&group_…
Revision: 6617
Author: russblau
Date: 2009-04-17 19:00:08 +0000 (Fri, 17 Apr 2009)
Log Message:
-----------
This should fix session expiration bug (although we may have to wait a month to be sure)
Modified Paths:
--------------
branches/rewrite/pywikibot/data/api.py
Modified: branches/rewrite/pywikibot/data/api.py
===================================================================
--- branches/rewrite/pywikibot/data/api.py 2009-04-17 16:34:38 UTC (rev 6616)
+++ branches/rewrite/pywikibot/data/api.py 2009-04-17 19:00:08 UTC (rev 6617)
@@ -229,7 +229,11 @@
self.site._userinfo.update(result['query']['userinfo'])
else:
self.site._userinfo = result['query']['userinfo']
-
+ if self.site._userinfo['name'] != self.site.user():
+ # user is no longer logged in (session expired?)
+ self.site.login(self.site._username.index(self.site.user()))
+ # retry the previous query
+ continue
if "warnings" in result:
modules = [k for k in result["warnings"] if k != "info"]
for mod in modules: