'Generate leetcode/lintcode problem url lists.'

def _gen_p_url_lists(self):

    leetcode_url = 'https://leetcode.com/problems/{}/'.format(self._p_url_path)
    lintcode_url = 'http://www.lintcode.com/en/problem/{}/'.format(self._p_url_path)
    for url in [leetcode_url, lintcode_url]:
        response = requests.head(url)
        if (response.status_code == 200):
            key_end = url.find('.com/')
            site = url[(key_end - 8):key_end]
            self._p_urls[site] = url
    p_title = self._get_p_title()
    p_url_lists = []
    for site in sorted(self._p_urls):
        p_list = '-    {site}:    [{title}]({url})'.format(site=site, title=p_title, url=self._p_urls[site])
        p_url_lists.append(p_list)
    return p_url_lists
