Created
April 6, 2022 23:48
-
-
Save luxu/333a4edc23795393eeacb19eea9c6a07 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import json | |
from requests import get | |
from bs4 import BeautifulSoup as bs | |
url = 'https://mangayabu.top/manga/one-piece/' | |
html = get(url) | |
soup = bs(html.content, 'html.parser') | |
json_data = soup.find('script', type='application/json') | |
num = json.loads(json_data.text)['allposts'][0]['num'] | |
data = json.loads(json_data.text)['allposts'][0]['date'] | |
print(num, data) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment