Page MenuHomePhabricator

Family.from_url() fails if multiple sites have different paths but same domain
Open, HighPublicBUG REPORT

Description

wowwiki is a SubdomainFamily. After moving the domain from wikia.com to fandom.com all sites has the same domain wowwiki.fandom.com and but the paths are different like

  • wowwiki.fandom.com/de
  • wowwiki.fandom.com/fr

using the script path.

Family.from_URL() doesn't work in this case because self._hostname(code)[1] == parsed.netloc always match for different sites and the method fails.

See family_tests.TestFamilyUrlRegex.test_each_family
https://integration.wikimedia.org/ci/job/pywikibot-core-tox-nose-docker/5341/console