First create a Page object, where 'mediawiki' is the site, and 'Manual:Pywikibot' is the title. You will get the desired URL with this method: https://doc.wikimedia.org/pywikibot/master/api_ref/pywikibot.page.html#page.BasePage.full_url
tohuuu <t...@tohuuu.de> ezt írta (időpont: 2024. aug. 23., P, 11:49): > Hi all, > > again a newbie question: How do i "translate" an interwiki link into a URL? > > Example: Parsing "[[:mw:Manual:Pywikibot|Manual:Pywikibot]]" using > mwparserfromhell yields a WikiLink object with > title=":mw:Manual:Pywikibot" and text = "Manual:Pywikibot" (both of type > WikiCode). Is there a way to translate the title part > ":mw:Manual:Pywikibot" into the URL > https://www.mediawiki.org/wiki/Manual:Pywikibot ? > > Thank you for any hints! > > Florian > > > _______________________________________________ > pywikibot mailing list -- pywikibot@lists.wikimedia.org > Public archives at > https://lists.wikimedia.org/hyperkitty/list/pywikibot@lists.wikimedia.org/message/VEA2VY5U5BXBGYIDT3VKEPNV6GYQ6KXU/ > To unsubscribe send an email to pywikibot-le...@lists.wikimedia.org > -- Bináris
_______________________________________________ pywikibot mailing list -- pywikibot@lists.wikimedia.org Public archives at https://lists.wikimedia.org/hyperkitty/list/pywikibot@lists.wikimedia.org/message/QYNV5HYP67AZR3TFQXNPSO7GC2NJIEDG/ To unsubscribe send an email to pywikibot-le...@lists.wikimedia.org