Tomer Sagi commited on
Commit
bbe548d
1 Parent(s): b908117

working on #12 some more

Browse files
Files changed (1) hide show
  1. scrape_script.py +3 -1
scrape_script.py CHANGED
@@ -59,7 +59,9 @@ def append_to_parquet(content, file_path, lang, top_level_directory):
59
  return
60
 
61
  # Apply cleaning rules
62
- content = re.sub(r'<span[^>]*>|</span>', '', content) # Remove HTML spans
 
 
63
 
64
  # Remove chapter markers
65
  chapter_markers = ['Chapter', 'Halakhah']
 
59
  return
60
 
61
  # Apply cleaning rules
62
+ content = re.sub(r'<(?:span|b|big|small|strong|br|sup[^>]*)[^>]*>|</(?:span|b|big|small|strong|sup)>', '', content) # Remove HTML tags
63
+ content = re.sub(r'https?://\S+', '', content) # Remove HTML links
64
+
65
 
66
  # Remove chapter markers
67
  chapter_markers = ['Chapter', 'Halakhah']