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