From 3884b3922f555ce39a842aaec32c4a0d57107068 Mon Sep 17 00:00:00 2001 From: jbjjbjjbj Date: Wed, 14 Dec 2016 13:18:11 +0100 Subject: Added script --- Scripts/wiki2P.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 Scripts/wiki2P.py (limited to 'Scripts') diff --git a/Scripts/wiki2P.py b/Scripts/wiki2P.py new file mode 100644 index 0000000..f0ded01 --- /dev/null +++ b/Scripts/wiki2P.py @@ -0,0 +1,16 @@ +import requests, bs4 + +#res = requests.get("https://en.wikipedia.org/wiki/Special:Random") +res = requests.get("https://en.wikipedia.org/wiki/Study") + + +soup = bs4.BeautifulSoup(res.text) + + +element = soup.select("p > a") + +print(element[0]) + +#while( soup.select(".firstHeading")[0] != "Philosophy"): +# +# print(soup.select(".firstHeading")[0].text) -- cgit v1.2.3