Spaces:
Runtime error
Runtime error
CognitiveScience
commited on
Commit
·
dfaeacc
1
Parent(s):
415561c
Create ccogsphere.py
Browse files- ccogsphere.py +11 -0
ccogsphere.py
ADDED
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
from bs4 import BeautifulSoup
|
2 |
+
import requests
|
3 |
+
|
4 |
+
def ccs(inp):
|
5 |
+
|
6 |
+
response = requests.get(inp)
|
7 |
+
soup = BeautifulSoup(response.text, "html.parser")
|
8 |
+
|
9 |
+
result=response.text[response.text.find("viewCount"):].split('"')[2]
|
10 |
+
|
11 |
+
return result
|