diff options
author | icoz <icoz.vt@gmail.com> | 2018-08-14 23:27:55 +0300 |
---|---|---|
committer | icoz <icoz.vt@gmail.com> | 2018-08-14 23:27:55 +0300 |
commit | 06c18031959152f6677afef1e28ca74aac738bde (patch) | |
tree | 23150fcc4d7c5a07b4ceba6bd2c0da13ddf6c235 | |
parent | 93d4ac29e008ed24bbd8b5997f4eddad69d9ed51 (diff) |
fix in css. Saving normal-width pdf
-rw-r--r-- | habr/topic.py | 2 | ||||
-rwxr-xr-x | habraparse.py | 7 |
2 files changed, 7 insertions, 2 deletions
diff --git a/habr/topic.py b/habr/topic.py index 3a26806..10e16f4 100644 --- a/habr/topic.py +++ b/habr/topic.py @@ -1,3 +1,5 @@ +#coding: utf8 + from copy import deepcopy from unittest import TestCase diff --git a/habraparse.py b/habraparse.py index 6831c1b..448bcd0 100755 --- a/habraparse.py +++ b/habraparse.py @@ -53,8 +53,9 @@ def prepare_html(topic, with_comments=False): # <link href="https://habracdn.net/habr/styles/1499416660/_build/global_main.css" rel="stylesheet" media="all" /> # <link href="https://habracdn.net/habr/styles/1499416660/_build/post_common_css.css" rel="stylesheet" media="print" /> # <link href="https://habracdn.net/habr/styles/1499416660/_build/global_main.css" rel="stylesheet" media="print" /> - - + # 14.08.2018 + # <link href = "https://dr.habracdn.net/habrcom/styles/1534243008/_build/global_main.css" rel = "stylesheet" media = "all" / > + # https://dr.habracdn.net/habrcom/styles/1534243008/stylesheets.mobile.css html_head = ''' <html> @@ -66,6 +67,8 @@ def prepare_html(topic, with_comments=False): <meta name="generator" content="habraparse"> <meta name="description" content="{desc}"> <meta name="keywords" content="{keywords}"> + <meta name="viewport" content="width=device-width"> + <link href = "https://dr.habracdn.net/habrcom/styles/1534243008/stylesheets.mobile.css" rel = "stylesheet" media = "all" /> </head> <body> <div id="layout"> |