commit 832071c0d2a6a367ecc3af28b0fe63fc853117fc
parent 6cdda6bfd09e6328582ef1b87cbae0f928c9e71e
Author: Isak Lindhé <isak.e.lindhe@gmail.com>
Date: Sun, 20 Jan 2019 16:24:50 +0100
basically nothing
Diffstat:
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/listing.py b/src/listing.py
@@ -18,7 +18,6 @@ def is_content_entry(tag: bs4.element.Tag):
# and all(isinstance(elem, str) for elem in children[:-1])
# and children[-1].name == 'a'
# )
- pass
return (
isinstance(tag, bs4.element.Tag)
and tag.name == 'span'
@@ -42,6 +41,7 @@ def parse_content_listing(page: bs4.element.Tag) -> list:
entries = [parse_content_entry(e) for e in entries]
return entries
+
def parse_content_entry(line: str) -> tuple:
m = re.fullmatch(r'(\* )?(.+[^.]).*[^0-9]([0-9]{3})[-f]?', line)
@@ -51,6 +51,7 @@ def parse_content_entry(line: str) -> tuple:
# raise RuntimeError(f'LINE DIDNT MATCH! {line}')
return None
+
def test_content_listing():
from pprint import pprint
page = get_page(102)[0]