Example #1
0
def get_links(Link):
    get_page = r.get(f"https://www.mmastreams100.com/{Link}")
    html_data = get_page.text

    soup = bs(html_data, "html.parser")

    #print(soup.prettify())

    discord = soup.find("a", href=re.compile('https://discord.gg/bv9jVKz'))
    #print(n)
    if discord is not None:
        for link in discord.find_all_next('a', attrs={"target": "_blank"}):
            a = link.get('href')
            if a not in links:
                links.append(a)
            else:
                pass
    else:
        print("fail")
Example #2
0
def get_links(Link):
	get_page = r.get(f"https://soccer.streamsgate.tv/event/{Link}")
	html_data = get_page.text

	soup = bs(html_data,"html.parser")
	
	#print(soup.prettify())

	discord = soup.find("a",href=re.compile('https://discord\.gg/gKqEYyr'))

	if discord is not None:
		for link in discord.find_all_next('a',attrs={"target": "_blank"}):
			a = link.get('href')
			if a not in links:
				links.append(a)
			else:
				pass
	else:
		print("fail")