This commit is contained in:
Simon Junod
2024-05-02 17:06:26 +02:00
parent 053627c35c
commit 45b874864d
2 changed files with 50 additions and 37 deletions

8
foo.py Normal file
View File

@@ -0,0 +1,8 @@
import requests
import json
from bs4 import BeautifulSoup as bs
html = requests.get("https://www.wikiart.org/").text
soup = bs(html, features="html.parser")
print(json.loads(soup.find("main", {"class": "wiki-layout-main-page"})["ng-init"].splitlines()[0][28:-1]))