want to get the number of clicks on a chapter of an article on the literature website, website address: http://www.jjwxc.net/onebook.
the url: of the dynamic information you want to obtain http://s8-static.jjwxc.net/ge.
this is my code:
from bs4 import BeautifulSoup
import requests
url = "http://s8-static.jjwxc.net/getnovelclick.php?novelid=3601&jsonpcallback=novelclick"
web_data = requests.get(url)
web_data.encoding = "gzip"
soup = BeautifulSoup(web_data.text, "html.parser")
print(soup)
print comes out like this:
novelclick({"1":"82686","2":"73363","3":"52320","4":"49171","5":"46838","6":"43687","7":"36339","8":"36067","9":"35917","10":"35570","11":"32912","12":"34357","13":"33653","14":"31370","15":"33803","16":"32647","17":"30681","18":"32163","19":"29455","20":"31213","21":"30199","22":"28536","23":"30041","24":"28862","25":"29439","26":"29469","27":"29378","28":"29678","29":"31427","30":"53411"})
how to remove the previous novelclick, to arrange the chapters and clicks, like this:
1 82686
2 73363
3 52320
4 49171
.
..