File size: 479 Bytes
88f2e7d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
from bs4 import BeautifulSoup
import requests

def ccs(inp):
    inp1=inp.split(":")
    if (inp1[0]=="https"):
        response = requests.get(inp)
        soup = BeautifulSoup(response.text, "html.parser")
        result=response.text[response.text.find("viewCount"):].split('"')[2]
    else:
        try:
            result=inp1[0] + " Picked " + inp1[1]
        except NameError:
            result="Bad Format" #inp1[0] + " Picked " + inp1[1] + "\n"
    

    return  result