2018-01-12 07:57:34 +00:00
|
|
|
#
|
|
|
|
|
# spec file for package python-cfscrape
|
|
|
|
|
#
|
2025-05-15 15:31:41 +00:00
|
|
|
# Copyright (c) 2025 SUSE LLC
|
2018-01-12 07:57:34 +00:00
|
|
|
#
|
|
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
|
2018-12-04 13:19:34 +00:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2018-01-12 07:57:34 +00:00
|
|
|
#
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Name: python-cfscrape
|
2020-04-10 18:26:47 +00:00
|
|
|
Version: 2.1.1
|
2018-01-12 07:57:34 +00:00
|
|
|
Release: 0
|
|
|
|
|
Summary: Python module to bypass Cloudflare's anti-bot page
|
|
|
|
|
License: MIT
|
|
|
|
|
Group: Development/Languages/Python
|
2019-03-14 14:57:19 +00:00
|
|
|
URL: https://github.com/Anorov/cloudflare-scrape
|
2019-05-15 11:08:10 +00:00
|
|
|
Source: https://github.com/Anorov/cloudflare-scrape/archive/%{version}.tar.gz#/cloudflare-scrape-%{version}.tar.gz
|
2025-05-15 15:31:41 +00:00
|
|
|
BuildRequires: %{python_module pip}
|
2019-05-15 11:08:10 +00:00
|
|
|
BuildRequires: %{python_module pytest}
|
|
|
|
|
BuildRequires: %{python_module requests}
|
|
|
|
|
BuildRequires: %{python_module responses}
|
2018-01-12 07:57:34 +00:00
|
|
|
BuildRequires: %{python_module setuptools}
|
2019-05-15 11:08:10 +00:00
|
|
|
BuildRequires: %{python_module sure}
|
2025-05-15 15:31:41 +00:00
|
|
|
BuildRequires: %{python_module wheel}
|
2018-01-12 07:57:34 +00:00
|
|
|
BuildRequires: fdupes
|
2019-05-15 11:08:10 +00:00
|
|
|
BuildRequires: nodejs
|
2018-01-12 07:57:34 +00:00
|
|
|
BuildRequires: python-rpm-macros
|
|
|
|
|
Requires: nodejs
|
|
|
|
|
Requires: python-requests
|
|
|
|
|
BuildArch: noarch
|
|
|
|
|
%python_subpackages
|
|
|
|
|
|
|
|
|
|
%description
|
|
|
|
|
A simple Python module to bypass Cloudflare's anti-bot page (also known as "I'm
|
|
|
|
|
Under Attack Mode", or IUAM), implemented with Requests.
|
|
|
|
|
|
|
|
|
|
This can be useful if you wish to scrape or crawl a website protected with
|
|
|
|
|
Cloudflare. Cloudflare's anti-bot page currently just checks if the client
|
|
|
|
|
supports Javascript, though they may add additional techniques in the future.
|
|
|
|
|
|
|
|
|
|
Due to Cloudflare continually changing and hardening their protection page,
|
|
|
|
|
cfscrape requires Node.js to solve Javascript challenges. This allows the script
|
|
|
|
|
to easily impersonate a regular web browser without explicitly deobfuscating and
|
|
|
|
|
parsing Cloudflare's Javascript.
|
|
|
|
|
|
|
|
|
|
Note: This only works when regular Cloudflare anti-bots is enabled (the
|
|
|
|
|
"Checking your browser before accessing..." loading page). If there is a
|
|
|
|
|
reCAPTCHA challenge, you're out of luck. Thankfully, the Javascript check page
|
|
|
|
|
is much more common.
|
|
|
|
|
|
|
|
|
|
%prep
|
2019-05-15 11:08:10 +00:00
|
|
|
%setup -q -n cloudflare-scrape-%{version}
|
2018-01-12 07:57:34 +00:00
|
|
|
|
|
|
|
|
%build
|
2025-05-15 15:31:41 +00:00
|
|
|
%pyproject_wheel
|
2018-01-12 07:57:34 +00:00
|
|
|
|
|
|
|
|
%install
|
2025-05-15 15:31:41 +00:00
|
|
|
%pyproject_install
|
2018-01-12 07:57:34 +00:00
|
|
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
|
|
|
|
|
2020-04-10 18:26:47 +00:00
|
|
|
# test suite requires internet access
|
|
|
|
|
# %%check
|
|
|
|
|
# %%python_exec setup.py develop --user
|
|
|
|
|
# %%python_exec -m pytest -v tests
|
2019-03-14 14:57:19 +00:00
|
|
|
|
2018-01-12 07:57:34 +00:00
|
|
|
%files %{python_files}
|
2018-01-31 19:13:14 +00:00
|
|
|
%license LICENSE
|
2018-01-31 19:34:56 +00:00
|
|
|
%doc README.md
|
2025-05-15 15:31:41 +00:00
|
|
|
%{python_sitelib}/cfscrape
|
|
|
|
|
%{python_sitelib}/cfscrape-%{version}*-info
|
2018-01-12 07:57:34 +00:00
|
|
|
|
|
|
|
|
%changelog
|