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