summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Scripts/wiki2P.py16
1 files changed, 16 insertions, 0 deletions
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)