1{
2 lib,
3 aiohttp,
4 aiohttp-socks,
5 beautifulsoup4,
6 buildPythonPackage,
7 dateparser,
8 fetchFromGitHub,
9 playwright-stealth,
10 playwright,
11 poetry-core,
12 puremagic,
13 pydub,
14 pythonOlder,
15 pythonRelaxDepsHook,
16 pytz,
17 requests,
18 setuptools,
19 speechrecognition,
20 tzdata,
21 w3lib,
22}:
23
24buildPythonPackage rec {
25 pname = "playwrightcapture";
26 version = "1.24.10";
27 pyproject = true;
28
29 disabled = pythonOlder "3.8";
30
31 src = fetchFromGitHub {
32 owner = "Lookyloo";
33 repo = "PlaywrightCapture";
34 rev = "refs/tags/v${version}";
35 hash = "sha256-kjh0ZrFS0jb4CYJfDosLiRffsVzF3/EWPYidBrhStIU=";
36 };
37
38 pythonRelaxDeps = [
39 "beautifulsoup4"
40 "playwright"
41 "setuptools"
42 "tzdata"
43 ];
44
45 build-system = [ poetry-core ];
46
47 nativeBuildInputs = [ pythonRelaxDepsHook ];
48
49 dependencies = [
50 aiohttp
51 aiohttp-socks
52 beautifulsoup4
53 dateparser
54 playwright
55 playwright-stealth
56 puremagic
57 pytz
58 requests
59 setuptools
60 tzdata
61 w3lib
62 ];
63
64 passthru.optional-dependencies = {
65 recaptcha = [
66 speechrecognition
67 pydub
68 requests
69 ];
70 };
71
72 # Module has no tests
73 doCheck = false;
74
75 pythonImportsCheck = [ "playwrightcapture" ];
76
77 meta = with lib; {
78 description = "Capture a URL with Playwright";
79 homepage = "https://github.com/Lookyloo/PlaywrightCapture";
80 changelog = "https://github.com/Lookyloo/PlaywrightCapture/releases/tag/v${version}";
81 license = licenses.bsd3;
82 maintainers = with maintainers; [ fab ];
83 };
84}