import requests
from bs4 import BeautifulSoup


def get_gz_links(url):
    """
    Returns all useful xml.gz links in the url
    - url: the url to extract xml.gz links
    >>> url = 'https://apkpure.com/sitemap.xml'
    >>> xml_gz_links = get_gz_links(url)
    >>> xml_gz_links[0]
    'https://apkpure.com/sitemaps/art_and_design.xml.gz'
    """
    #url = 'https://apkpure.com/sitemap.xml'
    r = requests.get(url)
    urlText = r.text
    soup = BeautifulSoup(urlText, features="lxml")
    idx_since = 55
    xml_gz_links = [l.get_text() for l in soup('loc')][idx_since:]
    return xml_gz_links