@@ -9,27 +9,62 @@ me know if it's broken, and if I have the bandwidth I'll try and fix it.
99
1010## Usage
1111
12+ ### From the wheel
13+
14+ This is _ probably_ what you're going to want. From [ Releases] ( https://github.com/Pyreko/yt-community-post-archiver/releases )
15+ install a wheel using Python.
16+
17+ 1 . [ Install Python] ( https://www.python.org/downloads/ ) .
18+
19+ 2 . Download one of the ` .whl ` files from [ Releases] ( https://github.com/Pyreko/yt-community-post-archiver/releases )
20+
21+ 3 . Install the wheel file. For example, if the file you downloaded is called ` yt_community_post_archiver-0.1.0-py3-none-any.whl ` :
22+
23+ ``` shell
24+ pip install yt_community_post_archiver-0.1.0-py3-none-any.whl
25+ ```
26+
27+ 4. Run ` yt-community-post-archiver` . For example:
28+
29+ ` ` ` shell
30+ yt-community-post-archiver " https://www.youtube.com/@PomuRainpuff/community"
31+ ` ` `
32+
33+ This will spawn a headless Chrome instance (that is, you won' t see a Chrome window) and download all posts
34+ it can find from the provided page, and save text metadata + images in an automatically created folder called
35+ `archive-output` in the same directory the program was called in. Note this will take a while!
36+
37+ For info on the options you can use, run with `--help`:
38+
39+ ```shell
40+ yt-community-post-archiver --help
41+ ```
42+
43+ ### From the repo
44+
12451. Clone the repo.
1346
14- 2 . (Optional) Create and source a venv:
47+ 2. [Install Python](https://www.python.org/downloads/).
48+
49+ 3. (Optional) Create and source a venv:
1550
1651 ```shell
1752 python3 -m venv venv
1853 source venv/bin/activate
1954 ```
2055
21- 3 . (Optional) Download the dependencies in ` requirements.txt ` if you do not already have them :
56+ 4 . (Optional) Install `hatch ` if you do not already have it :
2257
2358 ```shell
24- pip3 install -r requirements.txt
59+ pip3 install hatch
2560 ```
2661
27- 4 . Make sure the computer you're running this on has Chrome or Firefox, as it uses a browser to grab posts.
62+ 5 . Make sure the computer you' re running this on has Chrome or Firefox, as it uses a browser to grab posts.
2863
29- 5 . Run ` archiver.py ` . For example:
64+ 6 . Run the archiver using ` hatch run yt-community-post- archiver` . For example:
3065
3166 ` ` ` shell
32- python3 archiver.py " https://www.youtube.com/@PomuRainpuff/community"
67+ hatch run yt-community-post- archiver " https://www.youtube.com/@PomuRainpuff/community"
3368 ` ` `
3469
3570 This will spawn a headless Chrome instance (that is, you won' t see a Chrome window) and download all posts
@@ -39,15 +74,15 @@ me know if it's broken, and if I have the bandwidth I'll try and fix it.
3974 For info on the options you can use, run with `--help`:
4075
4176 ```shell
42- python3 archiver.py --help
77+ hatch run yt-community-post- archiver --help
4378 ```
4479
4580### Example
4681
4782For example, let' s say I ran:
4883
4984` ` ` shell
50- python3 archiver.py " https://www.youtube.com/@IRyS/community" -o " output/testing" -m 1
85+ hatch run yt-community-post- archiver " https://www.youtube.com/@IRyS/community" -o " output/testing" -m 1
5186` ` `
5287
5388This runs the archiver, directed to ` https://www.youtube.com/@IRyS/community` , saving to ` output/testing` , and gets
@@ -83,7 +118,7 @@ and an image file (`Ugkxbg1AcEsx5spUWRjgtF8cvXDDgUIW1SFo-0`).
83118If you want to set the save location, then use ` -o` :
84119
85120` ` ` shell
86- python3 archiver.py " https://www.youtube.com/@IRyS/community" -o " /home/me/my_save"
121+ hatch run yt-community-post- archiver " https://www.youtube.com/@IRyS/community" -o " /home/me/my_save"
87122` ` `
88123
89124# ## Logging in
@@ -108,7 +143,7 @@ By default this will use the default profile name; if you need to override this
108143Another method is if you have a Netscape-format cookies file, which you can pass the path with `-c`:
109144
110145```shell
111- python3 archiver.py " https://www.youtube.com/@WatsonAmelia/community" -c " /home/me/my_cookies_file.txt"
146+ hatch run yt-community-post- archiver "https://www.youtube.com/@WatsonAmelia/community" -c "/home/me/my_cookies_file.txt"
112147```
113148
114149Note that I' ve personally found this much flakier and occasionally fails in certain situations. It should
@@ -120,7 +155,7 @@ work fine if you just want to get a few posts though, and already have a cookie
120155The default driver is Chrome, but Firefox should work as well.
121156
122157` ` ` shell
123- python3 archiver.py " https://www.youtube.com/@PomuRainpuff/community" -d " firefox"
158+ hatch run yt-community-post- archiver " https://www.youtube.com/@PomuRainpuff/community" -d " firefox"
124159` ` `
125160
126161# # Notes
0 commit comments