15
0

Accepting request 563713 from home:lachs0r

Depends on 563712.

- init, 1.9.1

OBS-URL: https://build.opensuse.org/request/show/563713
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-cfscrape?expand=0&rev=1
This commit is contained in:
2018-01-12 07:57:34 +00:00
committed by Git OBS Bridge
commit 42148e0749
5 changed files with 100 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@@ -0,0 +1,23 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text

1
.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
.osc

3
cfscrape-1.9.1.tar.gz Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:9cee3708c643904eaa010a64dd1715890457bb77010d87405fc1bfeb892508d7
size 3568

4
python-cfscrape.changes Normal file
View File

@@ -0,0 +1,4 @@
-------------------------------------------------------------------
Thu Jan 11 11:19:00 UTC 2018 - 9@cirno.systems
- init, 1.9.1

69
python-cfscrape.spec Normal file
View File

@@ -0,0 +1,69 @@
#
# spec file for package python-cfscrape
#
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
#
# 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.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-cfscrape
Version: 1.9.1
Release: 0
Summary: Python module to bypass Cloudflare's anti-bot page
License: MIT
Group: Development/Languages/Python
URL: https://github.com/Anorov/cloudflare-scrape
Source: https://files.pythonhosted.org/packages/source/c/cfscrape/cfscrape-%{version}.tar.gz
BuildRequires: %{python_module devel}
BuildRequires: %{python_module setuptools}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
Requires: nodejs
Requires: python-PyExecJS
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
%setup -q -n cfscrape-%{version}
%build
%python_build
%install
%python_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%files %{python_files}
%{python_sitelib}/*
%changelog