def get_intellij_version()

in Intellij/IntellijURLProvider.py [0:0]


    def get_intellij_version(self, intellij_version_url):
        """Retrieve version number from XML."""
        # Read XML
        raw_xml = self.download(intellij_version_url, text=True)
        # Select the latest released build
        root = ET.fromstring(raw_xml)
        product = root.find('product[@name="IntelliJ IDEA"]')
        channel = product.find('channel[@status="release"]')
        builds = channel.findall("build")
        version = builds[0].attrib["version"]
        # Return pkg url.
        return str(version)