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