|
|
|
|
|
|
|
|
from pathlib import Path |
|
|
from pathlib import Path |
|
|
from time import perf_counter |
|
|
from time import perf_counter |
|
|
|
|
|
|
|
|
|
|
|
import httpx |
|
|
import lxml |
|
|
import lxml |
|
|
import markdown |
|
|
import markdown |
|
|
import requests |
|
|
|
|
|
from jinja2 import Environment as Env |
|
|
from jinja2 import Environment as Env |
|
|
from jinja2 import FileSystemLoader |
|
|
from jinja2 import FileSystemLoader |
|
|
from minicli import cli, run, wrap |
|
|
from minicli import cli, run, wrap |
|
|
|
|
|
|
|
|
embeddable in the template and rendered as is. |
|
|
embeddable in the template and rendered as is. |
|
|
""" |
|
|
""" |
|
|
# Retrieves the resource and turns it into a Readability doc. |
|
|
# Retrieves the resource and turns it into a Readability doc. |
|
|
response = requests.get(url) |
|
|
|
|
|
|
|
|
response = httpx.get(url) |
|
|
document = Document(response.text) |
|
|
document = Document(response.text) |
|
|
|
|
|
|
|
|
# The short title is more concise and readable. |
|
|
# The short title is more concise and readable. |