From 90d42bbd3c1d13a9887d5426112055d640181d4a Mon Sep 17 00:00:00 2001 From: aborruso Date: Sat, 2 Nov 2024 15:48:55 +0100 Subject: [PATCH] update --- scrape-linux-x86_64.spec | 38 ++++++++++++++++++++++++++++++++++++++ scrape_cli/__init__.py | 2 +- scrape_cli/scrape.py | 2 +- setup.py | 10 +++++++++- 4 files changed, 49 insertions(+), 3 deletions(-) create mode 100644 scrape-linux-x86_64.spec diff --git a/scrape-linux-x86_64.spec b/scrape-linux-x86_64.spec new file mode 100644 index 0000000..c9c2b60 --- /dev/null +++ b/scrape-linux-x86_64.spec @@ -0,0 +1,38 @@ +# -*- mode: python ; coding: utf-8 -*- + + +a = Analysis( + ['scrape_cli/scrape.py'], + pathex=[], + binaries=[], + datas=[], + hiddenimports=[], + hookspath=[], + hooksconfig={}, + runtime_hooks=[], + excludes=[], + noarchive=False, + optimize=0, +) +pyz = PYZ(a.pure) + +exe = EXE( + pyz, + a.scripts, + a.binaries, + a.datas, + [], + name='scrape-linux-x86_64', + debug=False, + bootloader_ignore_signals=False, + strip=False, + upx=True, + upx_exclude=[], + runtime_tmpdir=None, + console=True, + disable_windowed_traceback=False, + argv_emulation=False, + target_arch=None, + codesign_identity=None, + entitlements_file=None, +) diff --git a/scrape_cli/__init__.py b/scrape_cli/__init__.py index eeccfdf..4b18f03 100644 --- a/scrape_cli/__init__.py +++ b/scrape_cli/__init__.py @@ -4,7 +4,7 @@ from scrape_cli.scrape import main -__version__ = "1.1" +__version__ = "1.1.1" __author__ = "Andrea Borruso" __author_email__ = "aborruso@gmail.com" diff --git a/scrape_cli/scrape.py b/scrape_cli/scrape.py index 54204fe..c4d48f6 100644 --- a/scrape_cli/scrape.py +++ b/scrape_cli/scrape.py @@ -42,7 +42,7 @@ def main(): expression = [e if e.startswith('//') else GenericTranslator().css_to_xpath(e) for e in args.expression] - html_parser = etree.HTMLParser(encoding='utf-8', recover=True, strip_cdata=True) + html_parser = etree.HTMLParser(encoding='utf-8', recover=True) inp = open(args.file, 'rb') if args.file else args.html if args.rawinput: diff --git a/setup.py b/setup.py index 90cf794..b4cb117 100644 --- a/setup.py +++ b/setup.py @@ -1,9 +1,17 @@ +# setup.py from setuptools import setup +from pathlib import Path + +# Leggi il README +this_directory = Path(__file__).parent +long_description = (this_directory / "README.md").read_text(encoding="utf-8") setup( name="scrape-cli", - version="1.1", + version="1.1.1", description="It's a command-line tool to extract HTML elements using an XPath query or CSS3 selector.", + long_description=long_description, + long_description_content_type="text/markdown", # Specifica formato Markdown author="Andrea Borruso", author_email="aborruso@gmail.com", url="https://github.com/aborruso/scrape-cli",