Spaces:
Runtime error
Runtime error
Commit
·
3242331
1
Parent(s):
c49bc9d
Update ccogsphere.py
Browse files- ccogsphere.py +14 -8
ccogsphere.py
CHANGED
|
@@ -2,19 +2,25 @@ from bs4 import BeautifulSoup
|
|
| 2 |
import requests
|
| 3 |
|
| 4 |
def ccs(inp):
|
| 5 |
-
inp1=inp.split(":")
|
| 6 |
-
if (inp1=="https"):
|
| 7 |
response = requests.get(inp)
|
| 8 |
soup = BeautifulSoup(response.text, "html.parser")
|
| 9 |
result=response.text[response.text.find("viewCount"):].split('"')[2]
|
| 10 |
else:
|
| 11 |
-
if(
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
if (inp1=="Start"):
|
| 15 |
-
result="Start" + "\n"
|
| 16 |
else:
|
| 17 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 18 |
|
| 19 |
|
| 20 |
|
|
|
|
| 2 |
import requests
|
| 3 |
|
| 4 |
def ccs(inp):
|
| 5 |
+
inp1=inp.split(":")
|
| 6 |
+
if (inp1[0]=="https"):
|
| 7 |
response = requests.get(inp)
|
| 8 |
soup = BeautifulSoup(response.text, "html.parser")
|
| 9 |
result=response.text[response.text.find("viewCount"):].split('"')[2]
|
| 10 |
else:
|
| 11 |
+
if (len(inp)==2):
|
| 12 |
+
if(inp1[0]=="End"):
|
| 13 |
+
result=result + " The " + inp1
|
|
|
|
|
|
|
| 14 |
else:
|
| 15 |
+
if (inp1[0]=="Start"):
|
| 16 |
+
result="Started" + "\n"
|
| 17 |
+
else:
|
| 18 |
+
try:
|
| 19 |
+
result+=inp1[0] + " Picked " + inp1[1] + "\n"
|
| 20 |
+
except NameError:
|
| 21 |
+
result=inp1[0] + " Picked " + inp1[1] + "\n"
|
| 22 |
+
else:
|
| 23 |
+
result="Wrong Format"
|
| 24 |
|
| 25 |
|
| 26 |
|