cleaned output jvsCal scraper

This commit is contained in:
marko
2021-10-17 12:17:54 +02:00
parent 96ac67503b
commit 9ce46eb253
2 changed files with 24 additions and 17 deletions

View File

@@ -1,11 +1,11 @@
#! /usr/bin/env python3
# -*- coding: UTF-8 -*-
import requests
from bs4 import BeautifulSoup
import datetime
import json
import re
import requests
jvsCalUrl = "https://judoverbandsachsen.de/kalender/?show=all"
@@ -118,8 +118,8 @@ class wettkampf:
'address': self.address,
'ageGroups': self.ageGroups
}
def to_json(self):
return json.dumps(self.to_dict())
def to_json(self, indent=2):
return json.dumps(self.to_dict(), indent=indent)
@staticmethod
def from_htmlString(wkString, year=None):
'''