Permalink
Show file tree
Hide file tree
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
2 changed files
with
33 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,24 @@ | ||
import requests | ||
from bs4 import BeautifulSoup | ||
import webbrowser | ||
|
||
page=requests.get("https://www.youtube.com/") | ||
|
||
soup=BeautifulSoup(page.text,"html.parser") | ||
|
||
|
||
webbrowser.open("https://www.youtube.com/",new=2) | ||
if webbrowser.open("https://www.youtube.com/",new=2)==True: #status printing | ||
print("Successful browser, see in a few seconds.") | ||
print("Status: ",page) | ||
else: | ||
print("I'm sorry. The browser isn't working though.") | ||
print("Status: ",page) | ||
|
||
|
||
#artist_name_list=soup.find(class_="BodyText") | ||
|
||
#artist_name_list_items=artist_name_list.find_all("a") | ||
async def YouTubeBrowser(client,message): | ||
import requests | ||
from bs4 import BeautifulSoup | ||
import webbrowser | ||
|
||
page=requests.get("https://www.youtube.com/") | ||
|
||
soup=BeautifulSoup(page.text,"html.parser") | ||
|
||
|
||
webbrowser.open("https://www.youtube.com/",new=2) | ||
if webbrowser.open("https://www.youtube.com/",new=2)==True: #status printing | ||
print("Successful browser, see in a few seconds.") | ||
await client.send_message(message.channel,"Successful browser, see in a few seconds.") | ||
print("Status: ",page) | ||
msg="Status: "+str(page) | ||
await client.send_message(message.channel,msg) | ||
else: | ||
print("I'm sorry. The browser isn't working though.") | ||
await client.send_message(message.channel,"I'm sorry. The browser isn't working though.") | ||
print("Status: ",page) | ||
msg="Status: "+str(page) | ||
await client.send_message(message.channel,msg) | ||
|