Update app.py
Browse files
app.py
CHANGED
@@ -1,8 +1,7 @@
|
|
1 |
import os
|
2 |
from selenium import webdriver
|
3 |
from selenium.webdriver.chrome.options import Options
|
4 |
-
from
|
5 |
-
from ascii_magic import from_image_file, to_terminal
|
6 |
|
7 |
def capture_screenshot(url, output_path='screenshot.png'):
|
8 |
# Set up headless Chrome
|
@@ -20,9 +19,10 @@ def capture_screenshot(url, output_path='screenshot.png'):
|
|
20 |
driver.quit()
|
21 |
|
22 |
def convert_to_ascii(image_path):
|
23 |
-
#
|
24 |
-
|
25 |
-
|
|
|
26 |
|
27 |
if __name__ == '__main__':
|
28 |
url = input("Enter the website URL (e.g., https://example.com): ").strip()
|
|
|
1 |
import os
|
2 |
from selenium import webdriver
|
3 |
from selenium.webdriver.chrome.options import Options
|
4 |
+
from ascii_magic import AsciiArt
|
|
|
5 |
|
6 |
def capture_screenshot(url, output_path='screenshot.png'):
|
7 |
# Set up headless Chrome
|
|
|
19 |
driver.quit()
|
20 |
|
21 |
def convert_to_ascii(image_path):
|
22 |
+
# Create an AsciiArt instance from the image file
|
23 |
+
my_art = AsciiArt.from_image(image_path)
|
24 |
+
# Display the ASCII art in the terminal
|
25 |
+
my_art.to_terminal(columns=100, monochrome=True)
|
26 |
|
27 |
if __name__ == '__main__':
|
28 |
url = input("Enter the website URL (e.g., https://example.com): ").strip()
|