Skip to content

Commit

Permalink
Retire support for Python 2
Browse files Browse the repository at this point in the history
Retire Travis CI build and enable Python 3.8 and 3.9 in GitHub Actions

Enable local file access for wkhtmltopdf to fix failure in embedding images in PDFs
  • Loading branch information
huntrar committed Mar 19, 2021
1 parent 191cd4a commit 07fe9b4
Show file tree
Hide file tree
Showing 9 changed files with 21 additions and 26 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/pythonpackage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
strategy:
max-parallel: 4
matrix:
python-version: [2.7, 3.5, 3.6, 3.7]
python-version: [3.5, 3.6, 3.7, 3.8, 3.9]

steps:
- uses: actions/checkout@v1
Expand Down
11 changes: 0 additions & 11 deletions .travis.yml

This file was deleted.

7 changes: 7 additions & 0 deletions CHANGES.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
0.11.0
------

- Retire support for Python 2
- Retire Travis CI build and enable Python 3.8 and 3.9 in GitHub Actions
- Enable local file access for wkhtmltopdf to fix failure in embedding images in PDFs

0.10.2
------

Expand Down
2 changes: 1 addition & 1 deletion LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (C) 2015-2020 Hunter Hammond (huntrar@gmail.com)
Copyright (C) 2015-2021 Hunter Hammond (huntrar@gmail.com)

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

Expand Down
5 changes: 1 addition & 4 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
scrape |PyPI Version| |Build Status| |Total Downloads|
scrape |PyPI Version| |Total Downloads|
======================================================

a command-line web scraping tool
Expand Down Expand Up @@ -93,7 +93,6 @@ Author
Notes
-----

- Supports both Python 2.x and Python 3.x.
- Input to scrape can be links, files, or a combination of the two,
allowing you to create new files constructed from both existing and
newly scraped content.
Expand Down Expand Up @@ -130,7 +129,5 @@ Notes

.. |PyPI Version| image:: https://img.shields.io/pypi/v/scrape.svg
:target: https://pypi.python.org/pypi/scrape
.. |Build Status| image:: https://travis-ci.org/huntrar/scrape.svg?branch=master
:target: https://travis-ci.org/huntrar/scrape
.. |Total Downloads| image:: https://pepy.tech/badge/scrape
:target: https://pepy.tech/project/scrape
6 changes: 3 additions & 3 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
argparse==1.4.0
lxml==4.6.2
pdfkit==0.6.1
requests==2.21.0
requests==2.25.1
requests-cache==0.4.13
six==1.12.0
tldextract==2.2.0
six==1.15.0
tldextract==3.1.0
2 changes: 1 addition & 1 deletion scrape/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""scrape is a rule-based web crawler and information extraction tool capable of manipulating and merging new and existing documents. XML Path Language (XPath) and regular expressions are used to define rules for filtering content and web traversal. Output may be converted into text, csv, pdf, and/or HTML formats.
"""

__version__ = "0.10.2"
__version__ = "0.11.0"
2 changes: 1 addition & 1 deletion scrape/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -533,7 +533,7 @@ def write_pdf_files(args, infilenames, outfilename):
outfilename = outfilename + ".pdf"
outfilename = overwrite_file_check(args, outfilename)

options = {}
options = {"enable-local-file-access": None}
try:
if args["multiple"]:
# Multiple files are written one at a time, so infilenames will
Expand Down
10 changes: 6 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,10 @@ def read(*names):
return values


with open(os.path.join(os.path.abspath(os.path.dirname(__file__)), 'README.rst'), encoding='utf-8') as f:
with open(
os.path.join(os.path.abspath(os.path.dirname(__file__)), "README.rst"),
encoding="utf-8",
) as f:
long_description = f.read()


Expand All @@ -28,7 +31,7 @@ def read(*names):
version=scrape.__version__,
description="a command-line web scraping tool",
long_description=long_description,
long_description_content_type='text/x-rst',
long_description_content_type="text/x-rst",
classifiers=[
"Development Status :: 4 - Beta",
"Environment :: Console",
Expand All @@ -38,13 +41,12 @@ def read(*names):
"Intended Audience :: System Administrators",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python :: 2",
"Programming Language :: Python :: 2.7",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.5",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Topic :: Utilities",
"Topic :: Text Processing",
],
Expand Down

0 comments on commit 07fe9b4

Please sign in to comment.