Spaces:
Runtime error
Runtime error
Commit
·
e16c43d
1
Parent(s):
dfaeacc
Update ccogsphere.py
Browse files- ccogsphere.py +8 -4
ccogsphere.py
CHANGED
@@ -2,10 +2,14 @@ from bs4 import BeautifulSoup
|
|
2 |
import requests
|
3 |
|
4 |
def ccs(inp):
|
5 |
-
|
6 |
-
|
7 |
-
|
|
|
|
|
|
|
|
|
|
|
8 |
|
9 |
-
result=response.text[response.text.find("viewCount"):].split('"')[2]
|
10 |
|
11 |
return result
|
|
|
2 |
import requests
|
3 |
|
4 |
def ccs(inp):
|
5 |
+
inp1=inp.split(":")[0]
|
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 |
+
result="Echo" + response
|
12 |
+
|
13 |
|
|
|
14 |
|
15 |
return result
|