Permalink
Browse files

Follow redirects on Wikinews

  • Loading branch information...
JJMC89 committed Jun 2, 2018
1 parent 7092827 commit 804a8b5a65273a284a14fe540995adee22db425b
Showing with 5 additions and 0 deletions.
  1. +5 −0 multi/wikinews_importer.py
@@ -75,6 +75,11 @@ def doOnePage(tpl, page, site_src):
pywikibot.output(u'No target page specified!')
newsPage = pywikibot.Page(site_src, config['page'][0])
if newsPage.isRedirectPage():
try:
newsPage = newsPage.getRedirectTarget()
except pywikibot.CircularRedirect:
pass
text = u'\n'.join(
[u'%(indent)s %(prefix)s[[wikinews:%(lang)s:%(article_page)s|%(article_title)s]]' % {

0 comments on commit 804a8b5

Please sign in to comment.