Skip to content

Commit a6ee112

Browse files
committed
fixed typo from renamed html folder
1 parent bc89edd commit a6ee112

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

substack_scraper.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,12 @@
2121
from config import EMAIL, PASSWORD
2222

2323
USE_PREMIUM: bool = False # Set to True if you want to login to Substack and convert paid for posts
24-
BASE_SUBSTACK_URL: str = "https://www.experimental-history.com/" # Substack you want to convert to markdown
24+
BASE_SUBSTACK_URL: str = "https://reasonalone.substack.com/" # Substack you want to convert to markdown
2525
BASE_DIR_NAME: str = "substack_md_files" # Name of the directory we'll save the files to
2626
HTML_TEMPLATE: str = "author_template.html" # HTML template to use for the author page
2727
BASE_HTML_DIR: str = "substack_html_pages"
2828
JSON_DATA_DIR: str = "data"
29-
NUM_POSTS_TO_SCRAPE: int = 100
29+
NUM_POSTS_TO_SCRAPE: int = 10
3030

3131

3232
def extract_main_part(url: str) -> str:
@@ -63,7 +63,7 @@ def generate_html_file(author_name: str) -> None:
6363
html_with_author = html_with_data.replace('author_name', author_name)
6464

6565
# Write the modified HTML to a new file
66-
html_output_path = os.path.join('html', f'{author_name}.html')
66+
html_output_path = os.path.join(BASE_HTML_DIR, f'{author_name}.html')
6767
with open(html_output_path, 'w', encoding='utf-8') as file:
6868
file.write(html_with_author)
6969

0 commit comments

Comments
 (0)