Skip to content
Snippets Groups Projects
Commit b0b62e61 authored by Jonas Schürmann's avatar Jonas Schürmann
Browse files

Soup prototype

parent 276fd724
No related branches found
No related tags found
1 merge request!2Soup
...@@ -7,6 +7,8 @@ verify_ssl = true ...@@ -7,6 +7,8 @@ verify_ssl = true
[packages] [packages]
matrix-client = "==0.3.2" matrix-client = "==0.3.2"
beautifulsoup4 = "*"
requests = "*"
[requires] [requires]
python_version = "3.7" python_version = "3.7"
{ {
"_meta": { "_meta": {
"hash": { "hash": {
"sha256": "64a4b149949eab796895d1a5c3cb713100b5d13be4f4e6171db51ac7d68f3138" "sha256": "68ff6a56558a01e949cd70a0f010dc4f4d64448df6eaceca52c5b6aa6ed49125"
}, },
"pipfile-spec": 6, "pipfile-spec": 6,
"requires": { "requires": {
...@@ -16,6 +16,15 @@ ...@@ -16,6 +16,15 @@
] ]
}, },
"default": { "default": {
"beautifulsoup4": {
"hashes": [
"sha256:034740f6cb549b4e932ae1ab975581e6103ac8f942200a0e9759065984391858",
"sha256:945065979fb8529dd2f37dbb58f00b661bdbcbebf954f93b32fdf5263ef35348",
"sha256:ba6d5c59906a85ac23dadfe5c88deaf3e179ef565f4898671253e50a78680718"
],
"index": "pypi",
"version": "==4.7.1"
},
"certifi": { "certifi": {
"hashes": [ "hashes": [
"sha256:47f9c83ef4c0c621eaef743f133f09fa8a74a9b75f037e8624f83bd1b6626cb7", "sha256:47f9c83ef4c0c621eaef743f133f09fa8a74a9b75f037e8624f83bd1b6626cb7",
...@@ -50,8 +59,16 @@ ...@@ -50,8 +59,16 @@
"sha256:502a824f31acdacb3a35b6690b5fbf0bc41d63a24a45c4004352b0242707598e", "sha256:502a824f31acdacb3a35b6690b5fbf0bc41d63a24a45c4004352b0242707598e",
"sha256:7bf2a778576d825600030a110f3c0e3e8edc51dfaafe1c146e39a2027784957b" "sha256:7bf2a778576d825600030a110f3c0e3e8edc51dfaafe1c146e39a2027784957b"
], ],
"index": "pypi",
"version": "==2.21.0" "version": "==2.21.0"
}, },
"soupsieve": {
"hashes": [
"sha256:afa56bf14907bb09403e5d15fbed6275caa4174d36b975226e3b67a3bb6e2c4b",
"sha256:eaed742b48b1f3e2d45ba6f79401b2ed5dc33b2123dfe216adb90d4bfa0ade26"
],
"version": "==1.8"
},
"urllib3": { "urllib3": {
"hashes": [ "hashes": [
"sha256:61bf29cada3fc2fbefad4fdf059ea4bd1b4a86d2b6d15e1c7c0b582b9752fe39", "sha256:61bf29cada3fc2fbefad4fdf059ea4bd1b4a86d2b6d15e1c7c0b582b9752fe39",
......
...@@ -2,7 +2,15 @@ ...@@ -2,7 +2,15 @@
from matrix_client.client import MatrixClient from matrix_client.client import MatrixClient
import os import os
from bs4 import BeautifulSoup
import requests
def find_room():
html = requests.get("https://foss-ag.de/").text
soup = BeautifulSoup(html, 'html.parser')
dates = soup.find(id="ag-termine").next_sibling.find("ul").children
for date in dates:
print(date)
# Called when a message is recieved. # Called when a message is recieved.
def on_message(room, event): def on_message(room, event):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment