Create website_to_pdf
Browse files- pages/website_to_pdf +8 -0
pages/website_to_pdf
ADDED
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
from weasyprint import HTML
|
2 |
+
url = "https://www.bbk.bund.de/DE/Das-BBK/Das-BBK-stellt-sich-vor/Das-deutsche-Bevoelkerungsschutzsystem/das-deutsche-bevoelkerungsschutzsystem_node.html"
|
3 |
+
|
4 |
+
def res(url):
|
5 |
+
HTML(url).write_pdf("sample.pdf")
|
6 |
+
|
7 |
+
|
8 |
+
res(url)
|