Compare commits

...
This repository has been archived on 2022-06-28. You can view files and clone it, but cannot push or open issues or pull requests.

723 Commits

Author SHA1 Message Date
pluja
b43a72ab7b
Update README.md 2021-08-27 14:51:45 +02:00
FireMasterK
71949b8536
actions: fix docker builds
I have no idea how this even got here, git blame shows that this was done when the Nginx image was merged.
2021-07-17 00:29:31 +05:30
dependabot[bot]
b2b4abc541 Bump docker/setup-buildx-action from 1.5.0 to 1.5.1
Bumps [docker/setup-buildx-action](https://github.com/docker/setup-buildx-action) from 1.5.0 to 1.5.1.
- [Release notes](https://github.com/docker/setup-buildx-action/releases)
- [Commits](https://github.com/docker/setup-buildx-action/compare/v1.5.0...v1.5.1)

---
updated-dependencies:
- dependency-name: docker/setup-buildx-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-07-13 19:12:20 +05:30
dependabot[bot]
d174cecdd4 Bump docker/setup-buildx-action from 1.4.1 to 1.5.0
Bumps [docker/setup-buildx-action](https://github.com/docker/setup-buildx-action) from 1.4.1 to 1.5.0.
- [Release notes](https://github.com/docker/setup-buildx-action/releases)
- [Commits](https://github.com/docker/setup-buildx-action/compare/v1.4.1...v1.5.0)

---
updated-dependencies:
- dependency-name: docker/setup-buildx-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-07-05 13:40:38 +05:30
dependabot[bot]
b07957dcb1 Bump docker/build-push-action from 2.5.0 to 2.6.1
Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 2.5.0 to 2.6.1.
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](https://github.com/docker/build-push-action/compare/v2.5.0...v2.6.1)

---
updated-dependencies:
- dependency-name: docker/build-push-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-07-02 15:28:46 +05:30
dependabot[bot]
4bc4993c2f Bump docker/setup-buildx-action from 1.3.0 to 1.4.1
Bumps [docker/setup-buildx-action](https://github.com/docker/setup-buildx-action) from 1.3.0 to 1.4.1.
- [Release notes](https://github.com/docker/setup-buildx-action/releases)
- [Commits](https://github.com/docker/setup-buildx-action/compare/v1.3.0...v1.4.1)

---
updated-dependencies:
- dependency-name: docker/setup-buildx-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-06-30 16:18:08 +05:30
dependabot[bot]
faf1be26f9 Bump docker/login-action from 1.9.0 to 1.10.0
Bumps [docker/login-action](https://github.com/docker/login-action) from 1.9.0 to 1.10.0.
- [Release notes](https://github.com/docker/login-action/releases)
- [Commits](https://github.com/docker/login-action/compare/v1.9.0...v1.10.0)

---
updated-dependencies:
- dependency-name: docker/login-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-06-24 13:20:13 +05:30
PLUJA
09fbf47ed8
Merge pull request #220 from taivlam/patch-1
Change LBRY to Odysee and 2 minor typos
2021-06-13 07:15:57 +00:00
taivlam
3d56fed2eb
Change LBRY to Odysee and 2 minor typos
* Change LBRY to Odysee (for purposes of visiting decentralized platforms accessible via web browsers - haven't used LBRY desktop client in a while, but the more technical users still using the LBRY application can deal with this)
* Corrected 2 minor typos
2021-06-12 23:18:43 +00:00
PLUJA
dedfe652af
Merge pull request #219 from ytorg/dependabot/pip/urllib3-1.26.5
Bump urllib3 from 1.26.4 to 1.26.5
2021-06-06 08:28:12 +02:00
dependabot[bot]
da9892333a
Bump urllib3 from 1.26.4 to 1.26.5
Bumps [urllib3](https://github.com/urllib3/urllib3) from 1.26.4 to 1.26.5.
- [Release notes](https://github.com/urllib3/urllib3/releases)
- [Changelog](https://github.com/urllib3/urllib3/blob/main/CHANGES.rst)
- [Commits](https://github.com/urllib3/urllib3/compare/1.26.4...1.26.5)

---
updated-dependencies:
- dependency-name: urllib3
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-06-02 02:39:30 +00:00
dependabot[bot]
beb3758961 Bump actions/cache from 2.1.5 to 2.1.6
Bumps [actions/cache](https://github.com/actions/cache) from 2.1.5 to 2.1.6.
- [Release notes](https://github.com/actions/cache/releases)
- [Commits](https://github.com/actions/cache/compare/v2.1.5...v2.1.6)

Signed-off-by: dependabot[bot] <support@github.com>
2021-05-28 15:21:11 +05:30
dependabot[bot]
ebe9740684 Bump docker/setup-qemu-action from 1.1.0 to 1.2.0
Bumps [docker/setup-qemu-action](https://github.com/docker/setup-qemu-action) from 1.1.0 to 1.2.0.
- [Release notes](https://github.com/docker/setup-qemu-action/releases)
- [Commits](https://github.com/docker/setup-qemu-action/compare/v1.1.0...v1.2.0)

Signed-off-by: dependabot[bot] <support@github.com>
2021-05-27 15:05:09 +05:30
dependabot[bot]
664a07f766 Bump docker/build-push-action from 2.4.0 to 2.5.0
Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 2.4.0 to 2.5.0.
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](https://github.com/docker/build-push-action/compare/v2.4.0...v2.5.0)

Signed-off-by: dependabot[bot] <support@github.com>
2021-05-27 15:04:59 +05:30
dependabot[bot]
4b7e99e9d1 Bump docker/build-push-action from 2 to 2.4.0
Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 2 to 2.4.0.
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](https://github.com/docker/build-push-action/compare/v2...v2.4.0)

Signed-off-by: dependabot[bot] <support@github.com>
2021-05-12 06:14:40 +00:00
dependabot[bot]
d92f028e54 Bump docker/login-action from 1 to 1.9.0
Bumps [docker/login-action](https://github.com/docker/login-action) from 1 to 1.9.0.
- [Release notes](https://github.com/docker/login-action/releases)
- [Commits](https://github.com/docker/login-action/compare/v1...v1.9.0)

Signed-off-by: dependabot[bot] <support@github.com>
2021-05-12 06:14:23 +00:00
dependabot[bot]
612114ff3d Bump docker/setup-qemu-action from 1 to 1.1.0
Bumps [docker/setup-qemu-action](https://github.com/docker/setup-qemu-action) from 1 to 1.1.0.
- [Release notes](https://github.com/docker/setup-qemu-action/releases)
- [Commits](https://github.com/docker/setup-qemu-action/compare/v1...v1.1.0)

Signed-off-by: dependabot[bot] <support@github.com>
2021-05-12 06:13:49 +00:00
dependabot[bot]
37fbf298dd Bump actions/checkout from 2 to 2.3.4
Bumps [actions/checkout](https://github.com/actions/checkout) from 2 to 2.3.4.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v2...v2.3.4)

Signed-off-by: dependabot[bot] <support@github.com>
2021-05-12 06:13:33 +00:00
dependabot[bot]
8216a9b1f6 Bump docker/setup-buildx-action from 1 to 1.3.0
Bumps [docker/setup-buildx-action](https://github.com/docker/setup-buildx-action) from 1 to 1.3.0.
- [Release notes](https://github.com/docker/setup-buildx-action/releases)
- [Commits](https://github.com/docker/setup-buildx-action/compare/v1...v1.3.0)

Signed-off-by: dependabot[bot] <support@github.com>
2021-05-12 06:13:19 +00:00
dependabot[bot]
f90ce55b1e Bump actions/cache from v2.1.4 to v2.1.5
Bumps [actions/cache](https://github.com/actions/cache) from v2.1.4 to v2.1.5.
- [Release notes](https://github.com/actions/cache/releases)
- [Commits](https://github.com/actions/cache/compare/v2.1.4...1a9e2138d905efd099035b49d8b7a3888c653ca8)

Signed-off-by: dependabot[bot] <support@github.com>
2021-04-13 06:09:17 +00:00
PLUJA
6e7da09047
Add another mirror (backup) for this repo. 2021-04-12 10:00:29 +02:00
PLUJA
b1f538ec14
Merge pull request #206 from aljaxus/patch-1
Update README.md no more git.rip
2021-04-12 09:29:02 +02:00
PLUJA
7bb75909f4
Merge pull request #204 from 3nprob/nginx-docker
Add nginx Dockerfile
2021-04-12 09:27:55 +02:00
3nprob
789d5d16f7 Add GH action for nginx docker image 2021-04-12 09:20:45 +09:00
Aljaz S
11acb12aea
Update README.md
"Update" the git.rip address as the domain has been seized by FBI
2021-04-10 12:46:38 +02:00
3nprob
f0a5d2f167 Exclude static assets from yotter backend docker image 2021-04-10 13:31:26 +09:00
3nprob
bb38b8d9d7 Add nginx Dockerfile 2021-04-10 13:31:26 +09:00
PLUJA
2edcab95a4
Bump urllib3 from 1.26.3 to 1.26.4
Bump urllib3 from 1.26.3 to 1.26.4
2021-04-08 18:17:36 +02:00
dependabot[bot]
43f2904329
Bump urllib3 from 1.26.3 to 1.26.4
Bumps [urllib3](https://github.com/urllib3/urllib3) from 1.26.3 to 1.26.4.
- [Release notes](https://github.com/urllib3/urllib3/releases)
- [Changelog](https://github.com/urllib3/urllib3/blob/main/CHANGES.rst)
- [Commits](https://github.com/urllib3/urllib3/compare/1.26.3...1.26.4)

Signed-off-by: dependabot[bot] <support@github.com>
2021-04-06 18:10:42 +00:00
FireMasterK
0176703f88
Add curl as a build dep.
Needed to run the rust installer script.
2021-03-31 22:11:04 +00:00
FireMasterK
2ad6540b57
Add rust as a build dependency. (#201)
* Add rust as a build dependency.

This is because the `cryptography` package now uses rust for memory safety reasons.
2021-03-31 20:05:52 +00:00
PLUJA
432d12a695
Bump lxml for security reasons (CVE-2021-28957)
CVE Link: https://github.com/advisories/GHSA-jq4v-f5q6-mjqq
2021-03-31 17:20:01 +02:00
dependabot[bot]
4370e70258 Bump jinja2 from 2.11.2 to 2.11.3
Bumps [jinja2](https://github.com/pallets/jinja) from 2.11.2 to 2.11.3.
- [Release notes](https://github.com/pallets/jinja/releases)
- [Changelog](https://github.com/pallets/jinja/blob/master/CHANGES.rst)
- [Commits](https://github.com/pallets/jinja/compare/2.11.2...2.11.3)

Signed-off-by: dependabot[bot] <support@github.com>
2021-03-20 05:25:06 +00:00
dependabot[bot]
86e6132266 Bump urllib3 from 1.26.2 to 1.26.3
Bumps [urllib3](https://github.com/urllib3/urllib3) from 1.26.2 to 1.26.3.
- [Release notes](https://github.com/urllib3/urllib3/releases)
- [Changelog](https://github.com/urllib3/urllib3/blob/main/CHANGES.rst)
- [Commits](https://github.com/urllib3/urllib3/compare/1.26.2...1.26.3)

Signed-off-by: dependabot[bot] <support@github.com>
2021-03-19 20:00:26 +00:00
pluja
913506df59 Fix small error 2021-03-12 20:49:10 +01:00
pluja
d0aa476f70 Fix #195 and #193 2021-03-12 19:50:13 +01:00
Seth Simmons
1d52e68b3e
Add healthcheck for yotter (#196)
This is a simple addition that adds a healthcheck for the Yotter web UI, allowing for better monitoring and autohealing of the yotter container if the UI is unavailable.
2021-03-12 22:56:25 +05:30
PLUJA
255c162e6c
Update README.md 2021-03-04 10:08:42 +01:00
PLUJA
652b889db9
Add small roadmap 2021-03-01 17:03:48 +01:00
pluja
5770913103 Add autofocus to search input fields #194 2021-02-23 15:06:04 +01:00
PLUJA
39fb6294d7
Fix #190 2021-02-08 08:53:43 +01:00
dependabot[bot]
34a57e7d05 Bump actions/cache from v2.1.3 to v2.1.4
Bumps [actions/cache](https://github.com/actions/cache) from v2.1.3 to v2.1.4.
- [Release notes](https://github.com/actions/cache/releases)
- [Commits](https://github.com/actions/cache/compare/v2.1.3...26968a09c0ea4f3e233fdddbafd1166051a095f6)

Signed-off-by: dependabot[bot] <support@github.com>
2021-02-05 06:46:42 +00:00
pluja
3aae43e41b render admin messages as html 2021-02-04 21:50:49 +01:00
dependabot[bot]
3688ad517e Bump bleach from 3.2.1 to 3.3.0
Bumps [bleach](https://github.com/mozilla/bleach) from 3.2.1 to 3.3.0.
- [Release notes](https://github.com/mozilla/bleach/releases)
- [Changelog](https://github.com/mozilla/bleach/blob/master/CHANGES)
- [Commits](https://github.com/mozilla/bleach/compare/v3.2.1...v3.3.0)

Signed-off-by: dependabot[bot] <support@github.com>
2021-02-03 07:37:41 +00:00
PLUJA
07796eae25
Add mirror repo 2021-02-01 11:10:47 +01:00
pluja
005547cb82 Fix #187 2021-02-01 10:32:11 +01:00
pluja
bd78ea8b80 Merge branch 'dev-indep' of https://github.com/ytorg/yotter into dev-indep 2021-02-01 10:30:37 +01:00
pluja
46faa07273 Fix t#187 and change cache time limit 2021-02-01 10:28:05 +01:00
PLUJA
d3d67858a6
Merge pull request #179 from toh995/add-f-strings
Refactor to use f-strings
2021-01-20 08:12:54 +01:00
omicron-b
44d69394f6
fixed link to #configure-the-server (#181) 2021-01-08 12:40:57 +00:00
PLUJA
7d4bff599b
Merge pull request #180 from dantiodev/patch-1
Fix incorrect spellings
2021-01-08 08:41:47 +01:00
dantiodev
bf0647e95a
Fix incorrect spellings
"Trendig" should be trending. "recomendations" should be "recommendations".
2021-01-08 00:27:28 -06:00
toh995
7feef8c07f Refactor to use f-strings 2021-01-07 00:04:49 -08:00
PLUJA
fe31152a4f
Bump sqlalchemy from 1.3.21 to 1.3.22
Bump sqlalchemy from 1.3.21 to 1.3.22
2020-12-21 09:23:41 +01:00
dependabot[bot]
1c2e1a6a00
Bump sqlalchemy from 1.3.21 to 1.3.22
Bumps [sqlalchemy](https://github.com/sqlalchemy/sqlalchemy) from 1.3.21 to 1.3.22.
- [Release notes](https://github.com/sqlalchemy/sqlalchemy/releases)
- [Changelog](https://github.com/sqlalchemy/sqlalchemy/blob/master/CHANGES)
- [Commits](https://github.com/sqlalchemy/sqlalchemy/commits)

Signed-off-by: dependabot[bot] <support@github.com>
2020-12-21 07:29:59 +00:00
PLUJA
59211be961
Bump sqlalchemy from 1.3.20 to 1.3.21
Bump sqlalchemy from 1.3.20 to 1.3.21
2020-12-18 10:40:54 +01:00
dependabot[bot]
c06a71a086
Bump sqlalchemy from 1.3.20 to 1.3.21
Bumps [sqlalchemy](https://github.com/sqlalchemy/sqlalchemy) from 1.3.20 to 1.3.21.
- [Release notes](https://github.com/sqlalchemy/sqlalchemy/releases)
- [Changelog](https://github.com/sqlalchemy/sqlalchemy/blob/master/CHANGES)
- [Commits](https://github.com/sqlalchemy/sqlalchemy/commits)

Signed-off-by: dependabot[bot] <support@github.com>
2020-12-18 06:31:19 +00:00
dependabot[bot]
34afa311aa Bump requests from 2.25.0 to 2.25.1
Bumps [requests](https://github.com/psf/requests) from 2.25.0 to 2.25.1.
- [Release notes](https://github.com/psf/requests/releases)
- [Changelog](https://github.com/psf/requests/blob/master/HISTORY.md)
- [Commits](https://github.com/psf/requests/compare/v2.25.0...v2.25.1)

Signed-off-by: dependabot[bot] <support@github.com>
2020-12-17 06:27:46 +00:00
PLUJA
2821e8859f
Bump packaging from 20.7 to 20.8 2020-12-14 09:26:32 +01:00
dependabot[bot]
b7abd7900f
Bump packaging from 20.7 to 20.8
Bumps [packaging](https://github.com/pypa/packaging) from 20.7 to 20.8.
- [Release notes](https://github.com/pypa/packaging/releases)
- [Changelog](https://github.com/pypa/packaging/blob/master/CHANGELOG.rst)
- [Commits](https://github.com/pypa/packaging/compare/20.7...20.8)

Signed-off-by: dependabot[bot] <support@github.com>
2020-12-14 07:39:21 +00:00
PLUJA
117842c5e0
Bump cachetools from 4.1.1 to 4.2.0
Bump cachetools from 4.1.1 to 4.2.0
2020-12-11 09:41:00 +01:00
dependabot[bot]
95a19fc76d
Bump cachetools from 4.1.1 to 4.2.0
Bumps [cachetools](https://github.com/tkem/cachetools) from 4.1.1 to 4.2.0.
- [Release notes](https://github.com/tkem/cachetools/releases)
- [Changelog](https://github.com/tkem/cachetools/blob/master/CHANGELOG.rst)
- [Commits](https://github.com/tkem/cachetools/compare/v4.1.1...v4.2.0)

Signed-off-by: dependabot[bot] <support@github.com>
2020-12-11 06:13:54 +00:00
dependabot[bot]
5b26cb7f2e Bump certifi from 2020.11.8 to 2020.12.5
Bumps [certifi](https://github.com/certifi/python-certifi) from 2020.11.8 to 2020.12.5.
- [Release notes](https://github.com/certifi/python-certifi/releases)
- [Commits](https://github.com/certifi/python-certifi/compare/2020.11.08...2020.12.05)

Signed-off-by: dependabot[bot] <support@github.com>
2020-12-07 07:52:59 +00:00
dependabot[bot]
1a68eb15fb Bump packaging from 20.4 to 20.7
Bumps [packaging](https://github.com/pypa/packaging) from 20.4 to 20.7.
- [Release notes](https://github.com/pypa/packaging/releases)
- [Changelog](https://github.com/pypa/packaging/blob/master/CHANGELOG.rst)
- [Commits](https://github.com/pypa/packaging/compare/20.4...20.7)

Signed-off-by: dependabot[bot] <support@github.com>
2020-11-30 13:44:10 +05:30
dependabot[bot]
3847244b93 Bump lxml from 4.6.1 to 4.6.2
Bumps [lxml](https://github.com/lxml/lxml) from 4.6.1 to 4.6.2.
- [Release notes](https://github.com/lxml/lxml/releases)
- [Changelog](https://github.com/lxml/lxml/blob/master/CHANGES.txt)
- [Commits](https://github.com/lxml/lxml/compare/lxml-4.6.1...lxml-4.6.2)

Signed-off-by: dependabot[bot] <support@github.com>
2020-11-30 13:43:11 +05:30
PLUJA
af0872ae12
Bump zope-interface from 5.1.2 to 5.2.0
Bump zope-interface from 5.1.2 to 5.2.0
2020-11-27 09:24:21 +01:00
PLUJA
70abdbfcac
Update SELF-HOSTING.md 2020-11-27 09:19:34 +01:00
PLUJA
92374f2690
Update manual installation to use http3-ytproxy 2020-11-27 09:13:35 +01:00
pluja
e08d8ade7a Fix channel link from video page 2020-11-27 07:25:56 +01:00
pluja
50a59a41b7 Change html imports order. 2020-11-20 12:47:37 +01:00
pluja
1d732b9e9c Merge branch 'dev-indep' of https://github.com/ytorg/yotter into dev-indep 2020-11-20 12:42:06 +01:00
pluja
ba1f23d77e Support for video quality selection 2020-11-20 12:40:52 +01:00
PLUJA
e0f8ac3ee4
Fix hard-coded url 2020-11-17 08:14:21 +01:00
pluja
a8b05edba1 Add support for video hotkeys (#144) 2020-11-16 11:35:28 +01:00
pluja
d2f3585b6a Add youtube search borders 2020-11-16 11:35:06 +01:00
PLUJA
4525922ee0
Bump urllib3 from 1.26.1 to 1.26.2
Bump urllib3 from 1.26.1 to 1.26.2
2020-11-15 10:18:50 +01:00
dependabot[bot]
887d2177e4
Bump urllib3 from 1.26.1 to 1.26.2
Bumps [urllib3](https://github.com/urllib3/urllib3) from 1.26.1 to 1.26.2.
- [Release notes](https://github.com/urllib3/urllib3/releases)
- [Changelog](https://github.com/urllib3/urllib3/blob/master/CHANGES.rst)
- [Commits](https://github.com/urllib3/urllib3/compare/1.26.1...1.26.2)

Signed-off-by: dependabot[bot] <support@github.com>
2020-11-13 06:36:49 +00:00
PLUJA
6639f888cd
Bump requests from 2.24.0 to 2.25.0
Bump requests from 2.24.0 to 2.25.0
2020-11-12 10:23:05 +01:00
PLUJA
1a8e730a0a
Bump urllib3 from 1.25.11 to 1.26.1
Bump urllib3 from 1.25.11 to 1.26.1
2020-11-12 09:39:38 +01:00
PLUJA
4a4cf2bd78
Bump youtube-dlc from 2020.11.7 to 2020.11.11.post3
Bump youtube-dlc from 2020.11.7 to 2020.11.11.post3
2020-11-12 09:38:58 +01:00
dependabot[bot]
2962e68bc0
Bump youtube-dlc from 2020.11.7 to 2020.11.11.post3
Bumps [youtube-dlc](https://github.com/blackjack4494/yt-dlc) from 2020.11.7 to 2020.11.11.post3.
- [Release notes](https://github.com/blackjack4494/yt-dlc/releases)
- [Changelog](https://github.com/blackjack4494/yt-dlc/blob/master/ChangeLog)
- [Commits](https://github.com/blackjack4494/yt-dlc/commits)

Signed-off-by: dependabot[bot] <support@github.com>
2020-11-12 06:40:20 +00:00
dependabot[bot]
b64a50d4ab
Bump urllib3 from 1.25.11 to 1.26.1
Bumps [urllib3](https://github.com/urllib3/urllib3) from 1.25.11 to 1.26.1.
- [Release notes](https://github.com/urllib3/urllib3/releases)
- [Changelog](https://github.com/urllib3/urllib3/blob/master/CHANGES.rst)
- [Commits](https://github.com/urllib3/urllib3/compare/1.25.11...1.26.1)

Signed-off-by: dependabot[bot] <support@github.com>
2020-11-12 06:40:17 +00:00
dependabot[bot]
cd8c632838
Bump requests from 2.24.0 to 2.25.0
Bumps [requests](https://github.com/psf/requests) from 2.24.0 to 2.25.0.
- [Release notes](https://github.com/psf/requests/releases)
- [Changelog](https://github.com/psf/requests/blob/master/HISTORY.md)
- [Commits](https://github.com/psf/requests/compare/v2.24.0...v2.25.0)

Signed-off-by: dependabot[bot] <support@github.com>
2020-11-12 06:40:15 +00:00
PLUJA
cc6d6ec503
Update README.md 2020-11-11 12:42:03 +01:00
PLUJA
8bbdd81df0
Add titles to screenshots 2020-11-11 12:41:22 +01:00
PLUJA
1cbfbc03c8
Update screenshots 2020-11-11 12:39:05 +01:00
PLUJA
77fef07a6a
Delete CHANGELOG.md 2020-11-11 12:20:21 +01:00
PLUJA
a9151ebd46
Update README.md 2020-11-11 12:00:51 +01:00
pluja
ba28c82ab6 Wrong route fix 2020-11-10 14:36:28 +01:00
pluja
b2c3287144 Fix some twitter feeds not working. 2020-11-10 14:34:48 +01:00
pluja
85c24975e0 Remove twitter empty feeds before creating feed. 2020-11-10 13:55:46 +01:00
pluja
9fb1e5597e Use new fucntion to solve twitter error. 2020-11-10 12:44:40 +01:00
pluja
2b20fa7503 minor change 2020-11-09 18:08:32 +01:00
pluja
d39ebac719 Merge branch 'dev-indep' of https://github.com/ytorg/yotter into dev-indep 2020-11-09 15:39:46 +01:00
pluja
fac46ee853 Use new (self implemented) nitter API for Twitter (#140). 2020-11-09 15:39:30 +01:00
dependabot[bot]
d0428db939 Bump certifi from 2020.6.20 to 2020.11.8
Bumps [certifi](https://github.com/certifi/python-certifi) from 2020.6.20 to 2020.11.8.
- [Release notes](https://github.com/certifi/python-certifi/releases)
- [Commits](https://github.com/certifi/python-certifi/compare/2020.06.20...2020.11.08)

Signed-off-by: dependabot[bot] <support@github.com>
2020-11-09 18:25:46 +05:30
dependabot[bot]
bd109b5df3 Bump youtube-dlc from 2020.10.31 to 2020.11.7
Bumps [youtube-dlc](https://github.com/blackjack4494/yt-dlc) from 2020.10.31 to 2020.11.7.
- [Release notes](https://github.com/blackjack4494/yt-dlc/releases)
- [Changelog](https://github.com/blackjack4494/yt-dlc/blob/master/ChangeLog)
- [Commits](https://github.com/blackjack4494/yt-dlc/compare/2020.10.31...2020.11.07)

Signed-off-by: dependabot[bot] <support@github.com>
2020-11-09 18:07:41 +05:30
dependabot[bot]
28176c5823 Bump actions/cache from v2.1.2 to v2.1.3
Bumps [actions/cache](https://github.com/actions/cache) from v2.1.2 to v2.1.3.
- [Release notes](https://github.com/actions/cache/releases)
- [Commits](https://github.com/actions/cache/compare/v2.1.2...0781355a23dac32fd3bac414512f4b903437991a)

Signed-off-by: dependabot[bot] <support@github.com>
2020-11-09 18:07:02 +05:30
PLUJA
0bf1a53c7a
Update README.md 2020-11-09 09:11:43 +01:00
pluja
92689b954c Fix yotter data import 2020-11-06 14:58:43 +01:00
pluja
0454c711d4 Add comment 2020-11-06 14:48:27 +01:00
pluja
86b80502b6 Merge branch 'dev-indep' of https://github.com/ytorg/yotter into dev-indep 2020-11-06 11:55:06 +01:00
pluja
94ccbc4f99 Change video error message 2020-11-06 11:54:55 +01:00
PLUJA
8f6c5e4463
Nitter API readme 2020-11-06 11:46:40 +01:00
PLUJA
5e9f04a64d
Add Readme for Nitter api 2020-11-06 11:43:28 +01:00
pluja
1fc218605e First implementation of the API for Nitter (#140) 2020-11-06 11:24:59 +01:00
PLUJA
34d6491a8a
Add issue templates to ignore 2020-11-06 10:02:03 +01:00
PLUJA
9b68d04e5a Update issue templates 2020-11-06 09:57:22 +01:00
PLUJA
dcbff244b1 Update issue templates 2020-11-06 09:56:25 +01:00
dependabot[bot]
aa54096ad5
Bump zope-interface from 5.1.2 to 5.2.0
Bumps [zope-interface](https://github.com/zopefoundation/zope.interface) from 5.1.2 to 5.2.0.
- [Release notes](https://github.com/zopefoundation/zope.interface/releases)
- [Changelog](https://github.com/zopefoundation/zope.interface/blob/master/CHANGES.rst)
- [Commits](https://github.com/zopefoundation/zope.interface/compare/5.1.2...5.2.0)

Signed-off-by: dependabot[bot] <support@github.com>
2020-11-06 06:33:23 +00:00
FireMasterK
2d2f58791a
Clone the entire repository. 2020-11-06 08:55:10 +05:30
FireMasterK
61a694e1d4
Add the current version to a file when building. 2020-11-06 08:51:28 +05:30
pluja
889faa776c Use abbrev for verion (#130) 2020-11-05 19:29:01 +01:00
pluja
e4e8754fc8 Correction with docker versioning (#130) 2020-11-05 19:25:38 +01:00
pluja
c3f4247c31 Non-docker date fixes (#130) 2020-11-05 19:21:18 +01:00
pluja
a8b621acd7 Merge branch 'dev-indep' of https://github.com/ytorg/yotter into dev-indep 2020-11-05 19:15:52 +01:00
pluja
7316c3a70c Re-automate versioning (#130) 2020-11-05 19:15:11 +01:00
PLUJA
7b0f178fd5
Add redirect extensions 2020-11-05 15:30:51 +01:00
pluja
417af1a5f1 Link to /tags for versioning 2020-11-05 15:11:54 +01:00
pluja
36294cb0a9 Make server version Docker-compatible (#130) 2020-11-05 15:08:54 +01:00
pluja
a7c081174b Merge branch 'dev-indep' of https://github.com/ytorg/yotter into dev-indep 2020-11-04 09:38:54 +01:00
pluja
4b098d7f52 Add latest update date to /status 2020-11-04 09:38:51 +01:00
PLUJA
4d4d44ca55
Update README.md 2020-11-04 09:33:07 +01:00
pluja
39dafeaade Add link to commits on version 2020-11-04 09:30:15 +01:00
pluja
e58fbb873f Merge branch 'dev-indep' of https://github.com/ytorg/yotter into dev-indep 2020-11-04 09:28:05 +01:00
pluja
1162f2d489 Remove version from yotter config 2020-11-04 09:27:36 +01:00
pluja
b285081ca8 Set commit hash as version for automation 2020-11-04 09:27:19 +01:00
PLUJA
3d8818a818
Update README.md 2020-11-04 09:03:13 +01:00
PLUJA
6514e80ea4
Update README.md 2020-11-04 08:57:59 +01:00
pluja
eda19ffebb Add Yotter version to /status (#130) 2020-11-04 08:49:10 +01:00
pluja
b004a2da52 Add version to yotter-config.json 2020-11-04 08:43:48 +01:00
pluja
c0fc666d83 Merge 2020-11-04 08:28:34 +01:00
pluja
b84dc6dcc4 Fix Error on videos with no likes/dislikes
Error 500 was displayed on some videos which had 0 likes or 0 dislikes, as the returned type was None. It was already treated but not used
2020-11-04 08:28:14 +01:00
PLUJA
b5a0f84628
Merge pull request #135 from Christiankoo/background_import
Background process for importing data - Solves #95
2020-11-04 08:22:38 +01:00
Christiankoo
3564c19838 Background process for importing data 2020-11-03 22:00:38 +01:00
PLUJA
1585b47a76
Update README.md 2020-11-03 09:21:22 +01:00
pluja
9e7af17c73 Merge branch 'dev-indep' of https://github.com/ytorg/yotter into dev-indep 2020-11-03 09:16:45 +01:00
pluja
784fe27b3c Add link to faq on registrations 2020-11-03 09:16:31 +01:00
PLUJA
a97b7429de
Bump youtube-dlc from 2020.10.26 to 2020.10.31
Bump youtube-dlc from 2020.10.26 to 2020.10.31
2020-11-02 10:27:56 +01:00
dependabot[bot]
933d0b2c83
Bump youtube-dlc from 2020.10.26 to 2020.10.31
Bumps [youtube-dlc](https://github.com/blackjack4494/youtube-dlc) from 2020.10.26 to 2020.10.31.
- [Release notes](https://github.com/blackjack4494/youtube-dlc/releases)
- [Commits](https://github.com/blackjack4494/youtube-dlc/commits)

Signed-off-by: dependabot[bot] <support@github.com>
2020-11-02 07:24:40 +00:00
pluja
98b0b16f5a Fix error with twitter
Provoked by previous commit
2020-11-01 22:35:56 +01:00
pluja
923c3f2a62 Fix <br> text on tweets 2020-11-01 22:32:40 +01:00
PLUJA
64dc9b6658
add youtube-dlc and remove unused 2020-11-01 18:27:55 +01:00
PLUJA
22b9c84d76
Add more crypto donations 2020-11-01 18:26:08 +01:00
FireMasterK
6375ec6626 Add docker instructions for ytproxy. 2020-10-31 15:19:02 +05:30
FireMasterK
84b5008937 Add the go ytproxy. 2020-10-31 15:19:02 +05:30
FireMasterK
b5bfca0280 Fix the cache keys. 2020-10-31 15:19:02 +05:30
PLUJA
d7ad71bb7f
Replace register for status on public instances 2020-10-30 23:02:59 +01:00
FireMasterK
d654ed132d
Add a pypy docker image. (#129) 2020-10-31 00:15:55 +05:30
pluja
027f35983b Remove useless youtube_data and small fix 2020-10-30 16:37:12 +01:00
pluja
ff2d8e67d3 Fix videos without dislikes or likes (#123) 2020-10-30 16:26:23 +01:00
pluja
2b496ad70e mend 2020-10-30 16:22:37 +01:00
pluja
158117a66a Fix non-liked videos 2020-10-30 16:22:15 +01:00
pluja
78d6044dd2 Use Youtube-dlc for video data extraction 2020-10-30 16:16:09 +01:00
pluja
016bcd4775 Add lxml 2020-10-30 15:58:21 +01:00
pluja
be30aa5c82 Update and clean requirements 2020-10-30 12:32:09 +01:00
pluja
2cb60b6cb1 Merge branch 'dev-indep' of https://github.com/ytorg/yotter into dev-indep 2020-10-30 12:16:58 +01:00
dependabot[bot]
21df1b4182 Bump numpy from 1.19.2 to 1.19.3
Bumps [numpy](https://github.com/numpy/numpy) from 1.19.2 to 1.19.3.
- [Release notes](https://github.com/numpy/numpy/releases)
- [Changelog](https://github.com/numpy/numpy/blob/master/doc/HOWTO_RELEASE.rst.txt)
- [Commits](https://github.com/numpy/numpy/compare/v1.19.2...v1.19.3)

Signed-off-by: dependabot[bot] <support@github.com>
2020-10-29 12:21:27 +05:30
dependabot[bot]
3bbdede351 Bump python-dotenv from 0.14.0 to 0.15.0
Bumps [python-dotenv](https://github.com/theskumar/python-dotenv) from 0.14.0 to 0.15.0.
- [Release notes](https://github.com/theskumar/python-dotenv/releases)
- [Changelog](https://github.com/theskumar/python-dotenv/blob/master/CHANGELOG.md)
- [Commits](https://github.com/theskumar/python-dotenv/compare/v0.14.0...v0.15.0)

Signed-off-by: dependabot[bot] <support@github.com>
2020-10-29 12:18:01 +05:30
PLUJA
1342e34383
Bump feedparser from 6.0.1 to 6.0.2
Bump feedparser from 6.0.1 to 6.0.2
2020-10-27 10:34:01 +01:00
dependabot[bot]
aa2372cd13
Bump feedparser from 6.0.1 to 6.0.2
Bumps [feedparser](https://github.com/kurtmckee/feedparser) from 6.0.1 to 6.0.2.
- [Release notes](https://github.com/kurtmckee/feedparser/releases)
- [Changelog](https://github.com/kurtmckee/feedparser/blob/develop/CHANGELOG.rst)
- [Commits](https://github.com/kurtmckee/feedparser/compare/6.0.1...6.0.2)

Signed-off-by: dependabot[bot] <support@github.com>
2020-10-26 07:25:33 +00:00
PLUJA
11d9e07eae
Bump zope-interface from 5.1.0 to 5.1.2
Bump zope-interface from 5.1.0 to 5.1.2
2020-10-24 11:22:54 +02:00
PLUJA
b85876e136
Bump lxml from 4.5.2 to 4.6.1
Bump lxml from 4.5.2 to 4.6.1
2020-10-24 11:20:08 +02:00
PLUJA
1692d08983
Bump urllib3 from 1.25.10 to 1.25.11
Bump urllib3 from 1.25.10 to 1.25.11
2020-10-24 11:19:54 +02:00
PLUJA
dbe13e21ea
Merge pull request #121 from eetukarvonen/widen-ui
Widen the UI for video.html
2020-10-24 11:19:14 +02:00
eetukarvonen
e1cacd160a Widen the UI for video.html 2020-10-22 05:44:43 -04:00
dependabot[bot]
d7839fb31b
Bump urllib3 from 1.25.10 to 1.25.11
Bumps [urllib3](https://github.com/urllib3/urllib3) from 1.25.10 to 1.25.11.
- [Release notes](https://github.com/urllib3/urllib3/releases)
- [Changelog](https://github.com/urllib3/urllib3/blob/master/CHANGES.rst)
- [Commits](https://github.com/urllib3/urllib3/compare/1.25.10...1.25.11)

Signed-off-by: dependabot[bot] <support@github.com>
2020-10-20 05:57:09 +00:00
dependabot[bot]
92aa6b55c6
Bump lxml from 4.5.2 to 4.6.1
Bumps [lxml](https://github.com/lxml/lxml) from 4.5.2 to 4.6.1.
- [Release notes](https://github.com/lxml/lxml/releases)
- [Changelog](https://github.com/lxml/lxml/blob/master/CHANGES.txt)
- [Commits](https://github.com/lxml/lxml/compare/lxml-4.5.2...lxml-4.6.1)

Signed-off-by: dependabot[bot] <support@github.com>
2020-10-20 05:57:03 +00:00
PLUJA
d915f171be
Bump beautifulsoup4 from 4.9.2 to 4.9.3
Bump beautifulsoup4 from 4.9.2 to 4.9.3
2020-10-19 19:01:17 +02:00
PLUJA
3a74e4add8
Bump sqlalchemy from 1.3.19 to 1.3.20
Bump sqlalchemy from 1.3.19 to 1.3.20
2020-10-19 19:00:51 +02:00
PLUJA
294c8530de
Bump multidict from 4.7.6 to 5.0.0
Bump multidict from 4.7.6 to 5.0.0
2020-10-19 19:00:30 +02:00
pluja
fa893f2d05 Change nginxVideoProxy to isInstance 2020-10-17 13:09:08 +02:00
pluja
4b153cf7e9 Fix #113 2020-10-16 13:17:58 +02:00
pluja
3846264dd4 Fixes #110 2020-10-15 06:59:20 +02:00
dependabot[bot]
e220f02aad
Bump sqlalchemy from 1.3.19 to 1.3.20
Bumps [sqlalchemy](https://github.com/sqlalchemy/sqlalchemy) from 1.3.19 to 1.3.20.
- [Release notes](https://github.com/sqlalchemy/sqlalchemy/releases)
- [Changelog](https://github.com/sqlalchemy/sqlalchemy/blob/master/CHANGES)
- [Commits](https://github.com/sqlalchemy/sqlalchemy/commits)

Signed-off-by: dependabot[bot] <support@github.com>
2020-10-13 06:29:17 +00:00
dependabot[bot]
29297a0be4
Bump multidict from 4.7.6 to 5.0.0
Bumps [multidict](https://github.com/aio-libs/multidict) from 4.7.6 to 5.0.0.
- [Release notes](https://github.com/aio-libs/multidict/releases)
- [Changelog](https://github.com/aio-libs/multidict/blob/master/CHANGES.rst)
- [Commits](https://github.com/aio-libs/multidict/compare/v4.7.6...v5.0.0)

Signed-off-by: dependabot[bot] <support@github.com>
2020-10-13 06:29:17 +00:00
FireMasterK
686a9bef91
Merge pull request #104 from ytorg/dependabot/github_actions/actions/cache-v2.1.2
Bump actions/cache from v2.1.1 to v2.1.2
2020-10-12 13:33:58 +05:30
dependabot[bot]
ec8f2d8dde
Bump beautifulsoup4 from 4.9.2 to 4.9.3
Bumps [beautifulsoup4](http://www.crummy.com/software/BeautifulSoup/bs4/) from 4.9.2 to 4.9.3.

Signed-off-by: dependabot[bot] <support@github.com>
2020-10-12 07:12:20 +00:00
dependabot[bot]
9ac7be7a3b
Bump actions/cache from v2.1.1 to v2.1.2
Bumps [actions/cache](https://github.com/actions/cache) from v2.1.1 to v2.1.2.
- [Release notes](https://github.com/actions/cache/releases)
- [Commits](https://github.com/actions/cache/compare/v2.1.1...d1255ad9362389eac595a9ae406b8e8cb3331f16)

Signed-off-by: dependabot[bot] <support@github.com>
2020-10-12 07:08:50 +00:00
pluja
4e3a1f4ed3 Description error 2020-10-11 07:53:49 +02:00
pluja
bd5d300386 Fix error with descriptions 2020-10-11 07:51:49 +02:00
pluja
36abcbd0d7 Merge branch 'dev-indep' of https://github.com/ytorg/yotter into dev-indep 2020-10-10 22:35:13 +02:00
pluja
4d44cd267f Replace hardcoded boolean
Forgot it while testing :D
2020-10-10 22:34:56 +02:00
PLUJA
d279413d8f
Update README.md 2020-10-10 22:34:08 +02:00
PLUJA
98e817e3db
Update README.md 2020-10-10 22:33:15 +02:00
pluja
90b8018228 Merge branch 'dev-indep' of https://github.com/ytorg/yotter into dev-indep 2020-10-10 22:32:02 +02:00
pluja
691e35c22c Adds a status page 2020-10-10 22:31:33 +02:00
PLUJA
fde55caaf5
Change status image by link to register 2020-10-10 21:51:18 +02:00
PLUJA
efd389f3b7
Update README.md 2020-10-10 21:34:19 +02:00
pluja
023798abce Fix issue with URL host parameter 2020-10-10 21:30:59 +02:00
pluja
d6501f4cb9 Fix error 2020-10-10 21:28:33 +02:00
pluja
0f573dc7df Merge branch 'dev-indep' of https://github.com/ytorg/yotter into dev-indep 2020-10-10 21:26:36 +02:00
pluja
627e5e366f Fix some videos not working 2020-10-10 21:26:10 +02:00
FireMasterK
8866791251
Add more files to ignore. 2020-10-11 00:47:30 +05:30
FireMasterK
450a1c21d9
Fix action. 2020-10-11 00:44:00 +05:30
FireMasterK
de0bd653d4
Fix build caching by base image. 2020-10-11 00:42:03 +05:30
pluja
d028a2c343 Remove testing instance 2020-10-10 20:38:17 +02:00
pluja
eef05cc769 Improve channels page 2020-10-10 20:35:03 +02:00
pluja
f2badcef55 Improve video item UI and phone usage 2020-10-10 18:25:58 +02:00
pluja
fb2d3a962b Fix search results sometimes didnt show up 2020-10-10 18:08:49 +02:00
pluja
7a71b6914a Merge branch 'dev-indep' of https://github.com/ytorg/yotter into dev-indep 2020-10-10 17:33:51 +02:00
pluja
6e8e3b2131 update requirements 2020-10-10 17:33:35 +02:00
PLUJA
eb9bd592f1
Merge pull request #100 from ytorg/yotter-dev
Start using youtube-local adapted 'API'
2020-10-10 17:32:12 +02:00
pluja
8efae82302 First update, use youtube-local adapted 'API' 2020-10-10 17:26:28 +02:00
pluja
53586d0195 Fix twitter not working on fresh installations
There was a problem with cache not being created
2020-10-10 09:41:14 +02:00
PLUJA
46fc7ae832
Update SELF-HOSTING.md 2020-10-10 09:20:19 +02:00
PLUJA
6f7b1019c9
Reformat titles 2020-10-10 09:17:42 +02:00
PLUJA
79b7bb5fa5
Update docker guide 2020-10-10 09:12:12 +02:00
PLUJA
0f672050b2
Update docker installation. 2020-10-10 09:07:47 +02:00
PLUJA
e721c81dfe
Remove instance 2020-10-10 08:56:15 +02:00
PLUJA
1a2b567af5
Fix some issues with docker isntallation 2020-10-10 08:55:48 +02:00
PLUJA
6d0f49a7c3
Update SELF-HOSTING.md 2020-10-08 18:02:42 +02:00
PLUJA
69098d36d8
Add docker installation guide. 2020-10-08 10:53:43 +02:00
PLUJA
97e2fb6fca
Add docker installation guide. 2020-10-08 10:52:59 +02:00
PLUJA
d16af5a946
Update FAQ 2020-10-08 10:34:32 +02:00
PLUJA
9b5e80c265
Update README.md 2020-10-08 10:29:10 +02:00
PLUJA
5239cd4c49
Add new instance. 2020-10-07 21:47:08 +02:00
PLUJA
d6b142002a
Update SELF-HOSTING.md 2020-10-07 21:38:22 +02:00
PLUJA
6b0cd462f9
Public instances capacity 2020-10-07 21:35:23 +02:00
PLUJA
24ed27b987
Update README.md 2020-10-07 17:18:08 +02:00
pluja
c279367508 Fixes #97 2020-10-07 17:04:48 +02:00
pluja
ed055be0b5 Improve comments UI
Adds author like and sytles better
2020-10-07 16:49:42 +02:00
pluja
ea184ef316 Proxies comments avatar images 2020-10-07 16:26:45 +02:00
pluja
ae78f6c628 Add support for Youtube comments 2020-10-07 16:22:29 +02:00
pluja
2e8ab33259 Adds support for Youtube comments 2020-10-07 16:22:16 +02:00
PLUJA
d75450cfd5
Update README.md 2020-10-07 09:33:21 +02:00
PLUJA
409ee410e8
New section, edit Why and reorder 2020-10-07 09:26:44 +02:00
pluja
3298a001f5 Remove admin message from login page 2020-10-06 20:16:20 +02:00
pluja
5304aadbfa Improve login page UI 2020-10-06 20:14:30 +02:00
pluja
282618b6b8 Show admin messages only on login and home pages 2020-10-06 19:52:42 +02:00
pluja
c60b3ade82 Fixes tweet reply user profile links
When a user quoted another, the quoted user profile link was broken
2020-10-06 19:13:04 +02:00
pluja
3dbb76d6a3 Fixes some twitter profiles crashing
This was caused by line 874, when a tweet was not available
2020-10-06 19:09:14 +02:00
pluja
0829838063 Limit petitions to Nitter on 60s interval
Default: use cache if cache is not older than 1 minute
2020-10-06 18:11:28 +02:00
pluja
c677f0ff27 Merge branch 'dev-indep' of https://github.com/ytorg/yotter into dev-indep 2020-10-06 17:34:53 +02:00
pluja
74a3651faf Testing support for livestreams 2020-10-06 17:34:38 +02:00
FireMasterK
5d658311b6
Add dependabot for pip 2020-10-06 20:59:19 +05:30
PLUJA
5efc30c7ee
Bump beautifulsoup4 from 4.9.2 to 4.9.3
Bump beautifulsoup4 from 4.9.2 to 4.9.3
2020-10-06 14:36:22 +02:00
PLUJA
8b0c3dbe8a
update changelog - deprecated
This is the last update for the changelog. Changelog is now the commit page.
2020-10-06 08:43:04 +02:00
PLUJA
a6e6ee08b4
Update README.md 2020-10-05 23:15:33 +02:00
pluja
6219fa5f9d Fixes repeated tweets on feed 2020-10-05 23:12:34 +02:00
pluja
67178ea7a2 Update readme 2020-10-05 18:21:11 +02:00
pluja
5682080de0 Fix UI minor bug 2020-10-05 18:14:16 +02:00
pluja
d506d556b8 Improve youtube search
Adds pagination, sort modes, etc
2020-10-05 18:10:29 +02:00
pluja
1638252d22 Fixes channel avatars not shown on search 2020-10-05 17:19:10 +02:00
pluja
8250184877 Fixes problem with audio urls 2020-10-05 17:14:16 +02:00
pluja
7711c07739 Fixes bug with audo urls 2020-10-05 17:00:20 +02:00
pluja
66f81c3608 Fixes lives and scheduled videos errors 2020-10-05 16:58:01 +02:00
pluja
9b376abfc5 Catch ydl errors 2020-10-05 15:20:08 +02:00
pluja
ebe1b10c92 Improve video extractor 2020-10-05 15:12:02 +02:00
pluja
5d510101ab Fix scheduled videos 2020-10-05 13:48:54 +02:00
pluja
d1ec8e20b6 Merge branch 'dev-indep' of https://github.com/ytorg/yotter into dev-indep 2020-10-05 13:24:07 +02:00
pluja
ed688ac2ff Fix bug, some videos not working 2020-10-05 13:23:52 +02:00
FireMasterK
ae2fc56e7f
Merge pull request #89 from StuffNoOneCaresAbout/dev-indep
Add support for multi-architecture Docker builds.
2020-10-05 09:04:49 +00:00
PLUJA
d27990e56a
Merge pull request #92 from 0ihgk1uVBLlTBzVo7F9B/dev-indep
Simplify import process.
2020-10-05 09:11:06 +02:00
dependabot-preview[bot]
9e2f778b8d
Bump beautifulsoup4 from 4.9.2 to 4.9.3
Bumps [beautifulsoup4](http://www.crummy.com/software/BeautifulSoup/bs4/) from 4.9.2 to 4.9.3.

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-10-05 07:01:19 +00:00
pluja
28f155c033 Adds opening images in new tab 2020-10-04 08:13:42 +02:00
pluja
8143ea3a23 Fix image links and new tabs 2020-10-04 08:10:16 +02:00
0ihgk1uVBLlTBzVo7F9B
c05a53ca99 Simplify import process. 2020-10-03 19:06:37 +02:00
pluja
917a09101d Improves twitter feed images and quotations 2020-10-02 16:19:39 +02:00
pluja
874d5eb282 Changes variable name
From  to
2020-10-02 13:53:46 +02:00
pluja
e911deb425 Merge branch 'dev-indep' of https://github.com/ytorg/yotter into dev-indep 2020-10-02 13:50:39 +02:00
pluja
6bae58841b Increases max tweets on feed 2020-10-02 13:50:26 +02:00
dependabot-preview[bot]
03f8e22667
Bump zope-interface from 5.1.0 to 5.1.2
Bumps [zope-interface](https://github.com/zopefoundation/zope.interface) from 5.1.0 to 5.1.2.
- [Release notes](https://github.com/zopefoundation/zope.interface/releases)
- [Changelog](https://github.com/zopefoundation/zope.interface/blob/master/CHANGES.rst)
- [Commits](https://github.com/zopefoundation/zope.interface/compare/5.1.0...5.1.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-10-02 06:55:48 +00:00
FireMasterK
8501e87734
Add support for multi-architecture Docker builds. 2020-10-02 00:37:32 +05:30
FireMasterK
5fcbd167b0
Merge pull request #90 from Nico769/dev-indep
Fixes ytorg/Yotter#87 and removes redundant ports option
2020-10-01 23:45:18 +05:30
Nico769
a00a34610f Fixes ytorg/Yotter#87 and removes redundant ports option 2020-10-01 19:20:57 +02:00
PLUJA
66a9db86b3
Update README.md 2020-10-01 15:28:19 +02:00
pluja
945110071a Use safe html formatting 2020-10-01 12:02:26 +02:00
pluja
9f4f410dd7 Merge 2020-10-01 12:01:38 +02:00
pluja
aa05ac0718 Fixes error that prevented caching from working 2020-10-01 11:58:17 +02:00
PLUJA
31521b94c7
Add cache dir 2020-10-01 11:26:24 +02:00
pluja
b1ad5e48d7 Update requirements 2020-10-01 11:23:21 +02:00
pluja
6324ac9d5a Add pseudo-caching to twitter feed 2020-10-01 11:21:53 +02:00
pluja
fdfb106141 Adds showing actual page 2020-10-01 10:11:49 +02:00
pluja
99b1f23c6e Shows only 5 next pages
Fix showing all possible pages
2020-10-01 10:09:05 +02:00
pluja
9d500eb8d9 Add twitter pagination (Merge) 2020-10-01 09:48:01 +02:00
pluja
56151b78c4 Adds pagination on twitter feed
This improves performance on low-end devices
2020-10-01 09:47:45 +02:00
PLUJA
b729edab03
Bump zope-event from 4.4 to 4.5.0 2020-09-29 22:25:59 +02:00
PLUJA
e804dfeaf9
Bump greenlet from 0.4.16 to 0.4.17 2020-09-29 22:19:39 +02:00
pluja
f57ff4cce8 Merge branch 'dev-indep' of https://github.com/ytorg/yotter into dev-indep 2020-09-29 22:18:40 +02:00
pluja
fd1195ffaa Removes insecure clear_inactive_users endpoint (#85) 2020-09-29 22:18:25 +02:00
PLUJA
30b486d94e
Update README.md 2020-09-29 09:03:44 +02:00
pluja
c5dd461bdc Fix some videos didn't proxy 2020-09-27 11:19:26 +02:00
pluja
ead7890c22 Merge branch 'dev-indep' of https://github.com/ytorg/yotter into dev-indep 2020-09-27 11:15:48 +02:00
pluja
29d3c491ca Fix some videos didn't proxy 2020-09-27 11:15:37 +02:00
PLUJA
f62994b915
typo 2020-09-27 09:59:47 +02:00
PLUJA
6007c2d16e
Add 'configure-the-server' 2020-09-27 09:59:08 +02:00
PLUJA
f25bcac00b
Move 'configure the server' to SELF-HOSTING.md 2020-09-27 09:57:51 +02:00
PLUJA
a296506c27
Update README.md 2020-09-27 09:54:27 +02:00
PLUJA
f4cd1856aa
Update README.md 2020-09-27 06:34:58 +02:00
FireMasterK
b137b0e686
Use exact path
This is a test commit, dockerhub's build caching seems to fail here but works fine locally.
2020-09-27 01:06:26 +05:30
PLUJA
f99183d201
Bump beautifulsoup4 from 4.9.1 to 4.9.2
Bump beautifulsoup4 from 4.9.1 to 4.9.2
2020-09-26 20:39:01 +02:00
pluja
0ffbcdf154 yMerge branch 'dev-indep' of https://github.com/ytorg/yotter into dev-indep 2020-09-26 20:38:04 +02:00
pluja
641724f79f Fixes #81 on ytsearch 2020-09-26 20:37:44 +02:00
PLUJA
4c43b67678
Fix typo on update instructions that broke icons 2020-09-26 20:24:24 +02:00
PLUJA
1dd00670eb
Fix typo on nginx 2020-09-26 20:23:56 +02:00
pluja
2dbc62c6ff Fix typo 2020-09-26 20:18:50 +02:00
pluja
d0377b9d8d Fixes issue with favicon 2020-09-26 20:17:33 +02:00
pluja
bcb05268ba Fixes css and icons not found 2020-09-26 20:13:44 +02:00
pluja
89ac70faea fix issue loading 2020-09-26 20:10:42 +02:00
pluja
4d992270d8 Merge branch 'dev-indep' of https://github.com/ytorg/yotter into dev-indep 2020-09-26 20:06:39 +02:00
pluja
d7027b7d75 minor fixes 2020-09-26 20:06:24 +02:00
PLUJA
e574317b3d
Update README.md 2020-09-26 19:50:27 +02:00
PLUJA
70e813563f
Update README.md 2020-09-26 19:50:04 +02:00
PLUJA
4df81a65c5
Update SELF-HOSTING.md 2020-09-26 19:48:24 +02:00
PLUJA
7e68b52570
Update README.md 2020-09-26 19:43:18 +02:00
PLUJA
cf88e36be7
Update README.md 2020-09-26 19:40:48 +02:00
PLUJA
2a436aa0a7
Update README.md 2020-09-26 19:38:52 +02:00
dependabot-preview[bot]
644aef100f
Bump beautifulsoup4 from 4.9.1 to 4.9.2
Bumps [beautifulsoup4](http://www.crummy.com/software/BeautifulSoup/bs4/) from 4.9.1 to 4.9.2.

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-09-26 17:35:08 +00:00
PLUJA
7a6b1d1bdd
Fix typo on updating instructions 2020-09-26 17:57:27 +02:00
PLUJA
c4e49492f2
Update README.md 2020-09-26 15:18:33 +02:00
PLUJA
4f8e758209
Update CHANGELOG.md 2020-09-26 15:17:37 +02:00
PLUJA
3c8c7ce6a8
Add registrations icon 2020-09-26 15:16:14 +02:00
pluja
fa7d7f4d79 Merge branch 'dev-indep' of https://github.com/ytorg/yotter into dev-indep 2020-09-26 15:09:43 +02:00
pluja
75bf4d3bb5 Adds route to display current users 2020-09-26 15:09:26 +02:00
pluja
e9710af05b adds route to recieve registrations status icon 2020-09-26 15:01:12 +02:00
PLUJA
f382df1a46
Bump yarl from 1.5.1 to 1.6.0
Bump yarl from 1.5.1 to 1.6.0
2020-09-26 14:50:28 +02:00
PLUJA
855c23de28
Update max users yotter.xyz 2020-09-26 14:47:54 +02:00
PLUJA
8def9c44f2
Server config - add instance donation_url 2020-09-26 14:44:07 +02:00
PLUJA
8d6bdd2390
Update CHANGELOG.md 2020-09-26 14:42:49 +02:00
pluja
55116c3aab Merge branch 'dev-indep' of https://github.com/ytorg/yotter into dev-indep 2020-09-26 14:40:47 +02:00
pluja
836f50aaad Adds donation link to the instance
Check yotter-config.json
2020-09-26 14:40:30 +02:00
PLUJA
9f583e8c1d
Update SELF-HOSTING.md 2020-09-26 14:32:07 +02:00
PLUJA
4bacf500c6
Increase youtube channel follow size. 2020-09-26 14:31:54 +02:00
PLUJA
5702760337
Update instrucitons 2020-09-26 14:25:28 +02:00
PLUJA
a06281c412
Instructions on how to update 2020-09-26 14:23:10 +02:00
PLUJA
156a3ad53d
Update SELF-HOSTING.md 2020-09-26 14:20:35 +02:00
pluja
30ab9183bb Fixes thumbnails on channel won't load 2020-09-26 14:19:03 +02:00
pluja
1c02914b90 Solves #81 2020-09-26 14:07:37 +02:00
dependabot-preview[bot]
af26edb99f
Bump yarl from 1.5.1 to 1.6.0
Bumps [yarl](https://github.com/aio-libs/yarl) from 1.5.1 to 1.6.0.
- [Release notes](https://github.com/aio-libs/yarl/releases)
- [Changelog](https://github.com/aio-libs/yarl/blob/master/CHANGES.rst)
- [Commits](https://github.com/aio-libs/yarl/compare/v1.5.1...v1.6.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-09-24 06:58:15 +00:00
dependabot-preview[bot]
508070c0d7
Bump greenlet from 0.4.16 to 0.4.17
Bumps [greenlet](https://github.com/python-greenlet/greenlet) from 0.4.16 to 0.4.17.
- [Release notes](https://github.com/python-greenlet/greenlet/releases)
- [Changelog](https://github.com/python-greenlet/greenlet/blob/master/NEWS)
- [Commits](https://github.com/python-greenlet/greenlet/compare/0.4.16...0.4.17)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-09-23 20:30:55 +00:00
PLUJA
33e4c5404b
Merge pull request #77 from ytorg/dependabot/pip/gevent-20.9.0
Bump gevent from 20.6.2 to 20.9.0
2020-09-23 22:29:42 +02:00
dependabot-preview[bot]
7ba67142a7
Bump gevent from 20.6.2 to 20.9.0
Bumps [gevent](https://github.com/gevent/gevent) from 20.6.2 to 20.9.0.
- [Release notes](https://github.com/gevent/gevent/releases)
- [Changelog](https://github.com/gevent/gevent/blob/master/docs/changelog_pre.rst)
- [Commits](https://github.com/gevent/gevent/compare/20.6.2...20.9.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-09-23 07:03:04 +00:00
PLUJA
783dc1b2b7
Merge pull request #64 from ytorg/dependabot/pip/numpy-1.19.2
Bump numpy from 1.19.1 to 1.19.2
2020-09-21 23:02:31 +02:00
PLUJA
c7ef2892fe
Merge pull request #71 from ytorg/dependabot/pip/isort-5.5.3
Bump isort from 5.5.2 to 5.5.3
2020-09-21 23:02:19 +02:00
PLUJA
ded144fcd5
Merge pull request #72 from ytorg/dependabot/pip/youtube-dl-2020.9.20
Bump youtube-dl from 2020.9.14 to 2020.9.20
2020-09-21 23:02:05 +02:00
PLUJA
bbdf46d37e
Merge pull request #74 from ytorg/dependabot/pip/bleach-3.2.1
Bump bleach from 3.2.0 to 3.2.1
2020-09-21 23:01:27 +02:00
dependabot-preview[bot]
2f79027691
Bump bleach from 3.2.0 to 3.2.1
Bumps [bleach](https://github.com/mozilla/bleach) from 3.2.0 to 3.2.1.
- [Release notes](https://github.com/mozilla/bleach/releases)
- [Changelog](https://github.com/mozilla/bleach/blob/master/CHANGES)
- [Commits](https://github.com/mozilla/bleach/compare/v3.2.0...v3.2.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-09-21 06:58:59 +00:00
dependabot-preview[bot]
c96ea470fb
Bump zope-event from 4.4 to 4.5.0
Bumps [zope-event](https://github.com/zopefoundation/zope.event) from 4.4 to 4.5.0.
- [Release notes](https://github.com/zopefoundation/zope.event/releases)
- [Changelog](https://github.com/zopefoundation/zope.event/blob/master/CHANGES.rst)
- [Commits](https://github.com/zopefoundation/zope.event/compare/4.4...4.5.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-09-21 06:58:39 +00:00
dependabot-preview[bot]
e9a60338e7
Bump youtube-dl from 2020.9.14 to 2020.9.20
Bumps [youtube-dl](https://github.com/ytdl-org/youtube-dl) from 2020.9.14 to 2020.9.20.
- [Release notes](https://github.com/ytdl-org/youtube-dl/releases)
- [Changelog](https://github.com/ytdl-org/youtube-dl/blob/master/ChangeLog)
- [Commits](https://github.com/ytdl-org/youtube-dl/compare/2020.09.14...2020.09.20)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-09-21 06:58:28 +00:00
dependabot-preview[bot]
a824815d6a
Bump isort from 5.5.2 to 5.5.3
Bumps [isort](https://github.com/pycqa/isort) from 5.5.2 to 5.5.3.
- [Release notes](https://github.com/pycqa/isort/releases)
- [Changelog](https://github.com/PyCQA/isort/blob/develop/CHANGELOG.md)
- [Commits](https://github.com/pycqa/isort/compare/5.5.2...5.5.3)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-09-21 06:57:52 +00:00
PLUJA
f5eafee887
Docker update 2020-09-20 22:44:49 +02:00
FireMasterK
307634372f
Fix SQL Errors after upgrading the image. 2020-09-21 01:06:55 +05:30
pluja
701a9540d6 Merge branch 'dev-indep' of https://github.com/ytorg/yotter into dev-indep 2020-09-20 12:53:37 +02:00
pluja
55adc3213a Add debug + increase char limits 2020-09-20 12:53:25 +02:00
PLUJA
4f47476166
Update CHANGELOG.md 2020-09-20 12:42:27 +02:00
PLUJA
ce13f236ab
Update CHANGELOG.md 2020-09-20 12:39:18 +02:00
PLUJA
cff6f72362
Update README.md 2020-09-20 12:30:18 +02:00
pluja
fc72075161 Merge branch 'dev-indep' of https://github.com/ytorg/yotter into dev-indep 2020-09-20 12:19:54 +02:00
pluja
eb2f360f08 Fix thumbnails 2020-09-20 12:19:42 +02:00
PLUJA
8ab33a391f
Update CHANGELOG.md 2020-09-20 12:16:13 +02:00
FireMasterK
10ab56c91f
Add u/mansG's instance 2020-09-20 15:38:22 +05:30
PLUJA
b556ba8d79
Update instructions + news 2020-09-20 12:08:14 +02:00
PLUJA
4b243b114a
Update instrucitons! 2020-09-20 12:07:39 +02:00
pluja
61e2c27151 Fix typo 2020-09-20 12:03:05 +02:00
pluja
751613acc2 Merge branch 'dev-indep' of https://github.com/ytorg/yotter into dev-indep 2020-09-20 11:59:38 +02:00
pluja
2213e09006 Add ability to play audio only 2020-09-20 11:59:26 +02:00
PLUJA
113f7b1f15
Update routes.py 2020-09-20 10:54:10 +02:00
PLUJA
37fa630c23
Fix IMPORTANT typo. Do git pull! 2020-09-20 10:48:39 +02:00
PLUJA
31b6e17750
Update CHANGELOG.md 2020-09-20 09:51:23 +02:00
PLUJA
98f66b85e2
Update yotter.xyz instance 2020-09-20 09:48:06 +02:00
PLUJA
281e6202d6
Update README.md 2020-09-20 09:46:10 +02:00
PLUJA
42f7c3184e
Update SELF-HOSTING.md 2020-09-20 09:45:09 +02:00
PLUJA
ba56cba9dd
Update SELF-HOSTING.md 2020-09-20 09:43:50 +02:00
PLUJA
4a09996278
Update README.md 2020-09-20 09:42:25 +02:00
pluja
6a6b49bfcb Add admin tools 2020-09-20 09:34:53 +02:00
PLUJA
863a26de4a
Update SELF-HOSTING.md 2020-09-19 09:13:31 +02:00
PLUJA
81f2d006b0
Remove old instructions. 2020-09-19 09:13:03 +02:00
PLUJA
b8d7d93133
Increase character limits on models
Increased character limits on Youtube channel names, twitter body, twitter username... This needs a `flask db upgrade`.
2020-09-19 08:32:08 +02:00
PLUJA
908d6adf08
Merge pull request #68 from ytorg/dependabot/pip/bleach-3.2.0
Bump bleach from 3.1.5 to 3.2.0
2020-09-18 09:32:02 +02:00
dependabot-preview[bot]
05e5beb0f0
Bump bleach from 3.1.5 to 3.2.0
Bumps [bleach](https://github.com/mozilla/bleach) from 3.1.5 to 3.2.0.
- [Release notes](https://github.com/mozilla/bleach/releases)
- [Changelog](https://github.com/mozilla/bleach/blob/master/CHANGES)
- [Commits](https://github.com/mozilla/bleach/compare/v3.1.5...v3.2.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-09-17 06:56:45 +00:00
PLUJA
ce8790b823
Merge pull request #66 from ytorg/dependabot/pip/feedparser-6.0.1
Bump feedparser from 6.0.0 to 6.0.1
2020-09-16 12:36:19 +02:00
dependabot-preview[bot]
96f6758e55
Bump feedparser from 6.0.0 to 6.0.1
Bumps [feedparser](https://github.com/kurtmckee/feedparser) from 6.0.0 to 6.0.1.
- [Release notes](https://github.com/kurtmckee/feedparser/releases)
- [Changelog](https://github.com/kurtmckee/feedparser/blob/develop/NEWS)
- [Commits](https://github.com/kurtmckee/feedparser/compare/6.0.0...6.0.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-09-16 07:02:56 +00:00
PLUJA
28feb41446
Merge pull request #62 from ytorg/dependabot/pip/feedparser-6.0.0
Bump feedparser from 5.2.1 to 6.0.0
2020-09-15 11:59:32 +02:00
PLUJA
4fccbf54f4
Merge pull request #63 from ytorg/dependabot/pip/youtube-dl-2020.9.14
Bump youtube-dl from 2020.9.6 to 2020.9.14
2020-09-15 11:59:11 +02:00
PLUJA
016a3ed8f9
Merge pull request #65 from ytorg/dependabot/pip/alembic-1.4.3
Bump alembic from 1.4.2 to 1.4.3
2020-09-15 11:58:36 +02:00
FireMasterK
4ddb200129
Use the prebuilt docker image by default. 2020-09-15 15:06:29 +05:30
dependabot-preview[bot]
8a4ff7de8c
Bump alembic from 1.4.2 to 1.4.3
Bumps [alembic](https://github.com/sqlalchemy/alembic) from 1.4.2 to 1.4.3.
- [Release notes](https://github.com/sqlalchemy/alembic/releases)
- [Changelog](https://github.com/sqlalchemy/alembic/blob/master/CHANGES)
- [Commits](https://github.com/sqlalchemy/alembic/commits)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-09-15 09:10:49 +00:00
dependabot-preview[bot]
43f54df0ad
Bump numpy from 1.19.1 to 1.19.2
Bumps [numpy](https://github.com/numpy/numpy) from 1.19.1 to 1.19.2.
- [Release notes](https://github.com/numpy/numpy/releases)
- [Changelog](https://github.com/numpy/numpy/blob/master/doc/HOWTO_RELEASE.rst.txt)
- [Commits](https://github.com/numpy/numpy/compare/v1.19.1...v1.19.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-09-15 09:05:54 +00:00
PLUJA
7c71e4f9dc
Merge pull request #61 from ytorg/dependabot/pip/pymysql-0.10.1
Bump pymysql from 0.10.0 to 0.10.1
2020-09-15 11:04:50 +02:00
PLUJA
02cdcc4641
Merge pull request #60 from ytorg/dependabot/pip/isort-5.5.2
Bump isort from 5.5.1 to 5.5.2
2020-09-15 11:04:35 +02:00
dependabot-preview[bot]
683d9545d6
Bump youtube-dl from 2020.9.6 to 2020.9.14
Bumps [youtube-dl](https://github.com/ytdl-org/youtube-dl) from 2020.9.6 to 2020.9.14.
- [Release notes](https://github.com/ytdl-org/youtube-dl/releases)
- [Changelog](https://github.com/ytdl-org/youtube-dl/blob/master/ChangeLog)
- [Commits](https://github.com/ytdl-org/youtube-dl/compare/2020.09.06...2020.09.14)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-09-15 08:59:24 +00:00
dependabot-preview[bot]
188e0a9a80
Bump feedparser from 5.2.1 to 6.0.0
Bumps [feedparser](https://github.com/kurtmckee/feedparser) from 5.2.1 to 6.0.0.
- [Release notes](https://github.com/kurtmckee/feedparser/releases)
- [Changelog](https://github.com/kurtmckee/feedparser/blob/develop/NEWS)
- [Commits](https://github.com/kurtmckee/feedparser/compare/5.2.1...6.0.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-09-15 08:58:43 +00:00
dependabot-preview[bot]
c5a38430dd
Bump pymysql from 0.10.0 to 0.10.1
Bumps [pymysql](https://github.com/PyMySQL/PyMySQL) from 0.10.0 to 0.10.1.
- [Release notes](https://github.com/PyMySQL/PyMySQL/releases)
- [Changelog](https://github.com/PyMySQL/PyMySQL/blob/master/CHANGELOG.md)
- [Commits](https://github.com/PyMySQL/PyMySQL/commits)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-09-15 08:58:20 +00:00
dependabot-preview[bot]
eb5fb84b47
Bump isort from 5.5.1 to 5.5.2
Bumps [isort](https://github.com/pycqa/isort) from 5.5.1 to 5.5.2.
- [Release notes](https://github.com/pycqa/isort/releases)
- [Changelog](https://github.com/PyCQA/isort/blob/develop/CHANGELOG.md)
- [Commits](https://github.com/pycqa/isort/compare/5.5.1...5.5.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-09-15 08:58:01 +00:00
FireMasterK
4e440c8fea
Update README.md 2020-09-15 14:06:32 +05:30
PLUJA
1bc0158959
Update README.md 2020-09-15 10:24:20 +02:00
FireMasterK
1242b49f8d
Add a CI for building dependencies. 2020-09-15 13:33:46 +05:30
PLUJA
f16ed8c6e6
Update README.md 2020-09-14 21:17:17 +02:00
pluja
7e2024751c Remove images black lines from server 2020-09-14 20:40:46 +02:00
pluja
d2dfbbdb5f Proxy images through nginx v1 2020-09-14 20:39:10 +02:00
PLUJA
23a2809e0b
Update SELF-HOSTING.md 2020-09-14 20:04:46 +02:00
PLUJA
f9acfa69ea
Merge pull request #57 from eetukarvonen/top-button
Add return to top button (#33)
2020-09-14 19:59:24 +02:00
eetukarvonen
b2275938bb Add return to top button to user.html template 2020-09-14 09:44:26 -04:00
eetukarvonen
028c081f86 Add return to top button 2020-09-14 07:36:45 -04:00
PLUJA
6b243e9c4a
Update README.md 2020-09-13 08:36:27 +02:00
PLUJA
ae84e20c3f
Merge pull request #55 from StuffNoOneCaresAbout/pr-anon-volumes
Prevent data loss in anonymous volumes
2020-09-12 13:23:35 +02:00
FireMasterK
f93d4d3c07
Prevent data loss in the future. 2020-09-12 16:48:42 +05:30
PLUJA
1116db7177
What is youtube_data 2020-09-12 09:38:57 +02:00
pluja
47ec63fd27 Merge branch 'dev-indep' of https://github.com/pluja/Parasitter into dev-indep 2020-09-12 09:35:27 +02:00
pluja
85dacbf028 Add Channel youtube_data API, working but not implemented 2020-09-12 09:35:13 +02:00
PLUJA
ac2b503fb1
Update README.md 2020-09-12 07:49:00 +02:00
PLUJA
67fa4dd577
New instance location 2020-09-11 21:01:19 +02:00
PLUJA
86cda1d0a9
Add new instance! 2020-09-11 21:00:27 +02:00
PLUJA
820b1eb83f
Update README.md 2020-09-11 19:03:33 +02:00
PLUJA
6a482c9b5d
New instance! 2020-09-11 19:02:51 +02:00
PLUJA
d3fd2d7238
Merge pull request #46 from StuffNoOneCaresAbout/pr-docker-multistage
Docker multistage
2020-09-11 15:37:09 +02:00
FireMasterK
9f551f03a8 Simplify image. 2020-09-11 12:48:06 +00:00
FireMasterK
a89ff6b51b Remove --virtual 2020-09-11 09:43:49 +00:00
FireMasterK
ae926d74fc Multi stage Docker build file. 2020-09-11 09:36:41 +00:00
pluja
10a0a8ee76 Small fix on search 2020-09-11 10:40:02 +02:00
pluja
a3f4d89781 Improved Youtube search 2020-09-11 10:34:24 +02:00
pluja
1e4c4c82e3 Merge branch 'dev-indep' of https://github.com/pluja/Parasitter into dev-indep 2020-09-10 16:25:08 +02:00
pluja
745b816864 Add support for livestreams and scheduled videos on /watch 2020-09-10 16:24:53 +02:00
PLUJA
edfc454e01
Update README.md 2020-09-10 15:40:00 +02:00
PLUJA
be24aa2dae
Add update instructions 2020-09-10 15:38:19 +02:00
PLUJA
91a839be0a
Add instructions for last update 2020-09-10 15:37:56 +02:00
PLUJA
36f24e4832
Add nginx support for streaming 2020-09-10 09:40:52 +02:00
PLUJA
6feb5adf91
Update README.md 2020-09-10 09:38:50 +02:00
pluja
2a3668a645 Change url on line 325 to use config variable 2020-09-10 09:31:11 +02:00
pluja
d01e418c2f Add support for Nginx streaming (See docs) 2020-09-10 09:27:31 +02:00
pluja
cea9b63eca Add channelId 2020-09-10 02:32:40 +02:00
pluja
0451f6c16e Use data extractor module on /watch 2020-09-10 02:24:51 +02:00
pluja
a7c1eff8e2 Add data extractor module 2020-09-10 02:24:32 +02:00
pluja
f6e70fdbe3 Fix error on youtube feed - time 2020-09-10 00:25:00 +02:00
pluja
46149827c3 Update youtube-search-fork version 2020-09-09 16:42:33 +02:00
pluja
5ab583302e Fix error on youtube feed
time.days was an integer and not datetime
2020-09-09 16:40:28 +02:00
pluja
67a806fb24 open external on new tab 2020-09-09 16:39:58 +02:00
pluja
47696d60ca Fix youtube user not unfollowed, had to click twice 2020-09-09 15:57:46 +02:00
pluja
8f9838df10 Temporary fix: Youtube feed error #44 2020-09-09 14:02:45 +02:00
pluja
f799d2485b Add suport for removed Tweets (#42) 2020-09-09 11:27:43 +02:00
PLUJA
db3162c1c5
Merge pull request #40 from StuffNoOneCaresAbout/pr-hotfix
Hotfix for docker
2020-09-09 11:04:20 +02:00
FireMasterk
6abbd56df3 Reduce docker image size. 2020-09-09 14:31:33 +05:30
FireMasterK
becd9df30d
Fix for lxml. 2020-09-09 12:40:34 +05:30
FireMasterK
e3cfd22a6f
Add --no-cache 2020-09-09 12:27:56 +05:30
FireMasterK
4038a819f8
Some suggested changes. 2020-09-09 11:55:52 +05:30
FireMasterK
62bde03bfd
Hotfix for docker 2020-09-09 09:32:05 +05:30
PLUJA
55ea21bb76
Add docker installation 2020-09-08 15:37:46 +02:00
PLUJA
0fd019966b
Merge pull request #37 from StuffNoOneCaresAbout/pr-alpine
Alpine based docker image.
2020-09-08 15:22:45 +02:00
FireMasterK
8caf9d4763
Add a production capable docker-compose file. 2020-09-08 18:15:10 +05:30
PLUJA
35e144ecfc
Update CHANGELOG.md 2020-09-08 14:13:11 +02:00
pluja
af07bb130c Merge branch 'dev-indep' of https://github.com/pluja/Parasitter into dev-indep 2020-09-08 13:18:21 +02:00
pluja
b075a14d4f Fix typo and twitter syntax 2020-09-08 13:18:08 +02:00
PLUJA
3ee1545d06
Fuck typos 2020-09-08 13:14:55 +02:00
pluja
17dede55ab Fix /settings typo 2020-09-08 13:11:57 +02:00
pluja
131e033483 Merge branch 'dev-indep' of https://github.com/pluja/Parasitter into dev-indep 2020-09-08 13:08:17 +02:00
pluja
e1d2256c32 Add more config and last_seen 2020-09-08 13:08:05 +02:00
PLUJA
e2d466a86b
Update .gitignore 2020-09-08 12:34:03 +02:00
pluja
597cba865d Merge branch 'dev-indep' of https://github.com/pluja/Parasitter into dev-indep 2020-09-08 12:31:19 +02:00
pluja
30b40adb80 Add last_seen for better administration
This will allow admins to remove users who have not been logged in in a long time
2020-09-08 12:31:04 +02:00
pluja
cd7fa8e233 Fix config.py.
Default to .env DATABASE_URL, fallback to DATABASE_URL on app.db
2020-09-08 12:30:43 +02:00
PLUJA
5a16c98e86
Update README.md 2020-09-08 11:27:36 +02:00
PLUJA
7652cba659
Update CHANGELOG.md 2020-09-08 10:27:11 +02:00
pluja
d665a8649f Merge branch 'dev-indep' of https://github.com/pluja/Parasitter into dev-indep 2020-09-08 10:18:13 +02:00
pluja
69ada4948b Add keep-alive on /stream (#27) 2020-09-08 10:17:59 +02:00
pluja
e121930e6a Fix content-range 2020-09-08 10:17:59 +02:00
PLUJA
7af426b6bb Add issue number 2020-09-08 10:17:59 +02:00
PLUJA
c5e24e8c79 Update CHANGELOG.md 2020-09-08 10:17:59 +02:00
PLUJA
c41a3a60a8 Fix db error
Comment last_seen. Is throwing error.
2020-09-08 10:17:59 +02:00
PLUJA
10bafeebd3 Fix db error.
last_seen throws errors on production server. I'm investigating. commented for now.
2020-09-08 10:17:59 +02:00
pluja
ebc745ca9f Add /<username> route for Twitter 2020-09-08 10:17:59 +02:00
pluja
8a89c4ef86 Add extra headers to video stream request (#27) 2020-09-08 10:17:40 +02:00
FireMasterK
70fcc42a6b
Alpine based docker image. 2020-09-08 12:46:57 +05:30
PLUJA
ae7a24f3ea
Add issue number 2020-09-08 00:12:04 +02:00
PLUJA
a9611645c6
Update CHANGELOG.md 2020-09-08 00:06:55 +02:00
PLUJA
b410e46f69
Fix db error
Comment last_seen. Is throwing error.
2020-09-08 00:03:42 +02:00
PLUJA
0285135d4f
Fix db error.
last_seen throws errors on production server. I'm investigating. commented for now.
2020-09-08 00:02:51 +02:00
pluja
37e8bf4100 Merge branch 'dev-indep' of https://github.com/pluja/Parasitter into dev-indep 2020-09-07 23:53:57 +02:00
pluja
f795eeb0e7 Improve settings page 2020-09-07 23:53:11 +02:00
pluja
118bd6ea40 Add last_seen for better administration
This will allow admins to remove users who have not been logged in in a long time
2020-09-07 23:32:06 +02:00
PLUJA
791cd418d8
Update README.md 2020-09-07 22:21:57 +02:00
PLUJA
33a0119c73
Change license to AGPL
Better for server side apps.
2020-09-07 22:19:53 +02:00
PLUJA
acee221bb6
Update SELF-HOSTING.md 2020-09-07 15:40:05 +02:00
pluja
550a5055d3 Merge branch 'dev-indep' of https://github.com/pluja/Parasitter into dev-indep 2020-09-07 15:22:56 +02:00
pluja
6c05c647e9 Update requirements versions 2020-09-07 15:22:41 +02:00
pluja
b6bb2a3cfa Detect livestreams on Youtube video search and feed 2020-09-07 15:19:00 +02:00
PLUJA
37a00839eb
Update SELF-HOSTING.md 2020-09-07 13:44:20 +02:00
PLUJA
6b5555a46e
Update SELF-HOSTING.md 2020-09-07 13:37:15 +02:00
PLUJA
ced9f87d60
Update SELF-HOSTING.md 2020-09-07 13:34:30 +02:00
PLUJA
8830dbe5fa
Update SELF-HOSTING.md 2020-09-07 13:21:46 +02:00
PLUJA
a797e71212
Update SELF-HOSTING.md 2020-09-07 13:20:48 +02:00
PLUJA
90f18bcb58
Clarifications 2020-09-07 12:55:56 +02:00
PLUJA
657805a7a0
Update CHANGELOG.md 2020-09-07 12:31:50 +02:00
PLUJA
8ee3de6bc4
Update CHANGELOG.md 2020-09-07 12:31:39 +02:00
pluja
40f11fc0c6 Merge branch 'dev-indep' of https://github.com/pluja/Parasitter into dev-indep 2020-09-07 12:22:03 +02:00
pluja
091f501fe4 #27: Improve video streaming
Don't execute YoutubeDL each time the video is seeking
2020-09-07 12:21:23 +02:00
PLUJA
5a68476fd6
Fix typo 2020-09-06 23:16:13 +02:00
PLUJA
8fd6e3bff6
Update SELF-HOSTING.md 2020-09-06 23:15:26 +02:00
PLUJA
4bfbd0fa6e
Update CHANGELOG.md 2020-09-06 22:51:41 +02:00
PLUJA
c461d31113
Fix link 2020-09-06 22:46:20 +02:00
PLUJA
fc3902cd00
Update README.md 2020-09-06 22:45:43 +02:00
PLUJA
aa477dd7b9
Update yotter-config.json
Change restrictions to true.
2020-09-06 22:35:30 +02:00
pluja
c009ce45fa Merge branch 'dev-indep' of https://github.com/pluja/Parasitter into dev-indep 2020-09-06 22:33:56 +02:00
pluja
6917b476fd #29: First login-less pages
This commit adds a config for . When enabled it allows users to navigate on the routes which don't have the @login_required
2020-09-06 22:33:39 +02:00
PLUJA
58da1a0459
How to: Removing log-in restrictions 2020-09-06 22:31:01 +02:00
PLUJA
1c89bd9093
Update SELF-HOSTING.md 2020-09-06 18:32:00 +02:00
PLUJA
f38541cf96
Clarifications on self-hosting. 2020-09-06 18:25:30 +02:00
PLUJA
0c6003065d
Clarifications with self-hosting. 2020-09-06 18:24:32 +02:00
pluja
c0d203afde video title on tab when on /watch 2020-09-06 12:57:27 +02:00
PLUJA
0d4758e697
Remove last_seen
Strange bug. Need to study more about this.
2020-09-06 12:25:56 +02:00
PLUJA
c12aa6556b
remove last_seen
Some strange bug produces an error when using pymysql.
2020-09-06 12:25:25 +02:00
pluja
82b029296d Merge branch 'dev-indep' of https://github.com/pluja/Parasitter into dev-indep 2020-09-06 12:11:20 +02:00
pluja
2dcae564d0 Move last_seen to index 2020-09-06 12:11:05 +02:00
PLUJA
6858fbdd3c
Update SELF-HOSTING.md 2020-09-06 12:09:27 +02:00
pluja
3adb771987 Move last_seen to index 2020-09-06 11:55:19 +02:00
pluja
86a525dd2d Remove debug print 2020-09-06 11:40:39 +02:00
pluja
6bd045ba6b Add user last_seen
This will facilitate maintenance in the future. Running a script to clean the database from dead accounts will now be much easier
2020-09-06 11:24:03 +02:00
pluja
e325fdd08a Increase video stream chunk size 2020-09-06 10:43:40 +02:00
pluja
a0b8257bd7 Option to delete account 2020-09-06 10:27:14 +02:00
PLUJA
ab47a25707
Update README.md 2020-09-06 09:48:53 +02:00
PLUJA
56f02113fd
Update README.md 2020-09-05 15:34:13 +02:00
PLUJA
d3ac9e54ce
Update README.md 2020-09-05 14:45:05 +02:00
PLUJA
641904737e
Update README.md 2020-09-05 14:43:28 +02:00
PLUJA
fd65af0493
Add Contributing 2020-09-05 14:41:59 +02:00
pluja
de89765747 Add name on instance info 2020-09-05 13:28:57 +02:00
pluja
a968962b40 Add instance info on settings 2020-09-05 13:25:45 +02:00
pluja
6063cc0b29 Add word-break to video descriptions 2020-09-05 13:16:58 +02:00
PLUJA
f58142489a
Change BTC and XMR addresses 2020-09-05 12:41:14 +02:00
PLUJA
755c1a7f1b
Update README.md 2020-09-05 12:40:14 +02:00
PLUJA
bbb5171652
Comment non implemented settings
Some non implemented settings were shown and it was confusing for users.
2020-09-05 11:59:04 +02:00
PLUJA
90bb7d3b14
Update README.md 2020-09-05 11:33:43 +02:00
PLUJA
a53ba58c0b
Change BTC donation address to Bech-32 2020-09-05 10:51:00 +02:00
pluja
0ddf19534a Merge branch 'dev-indep' of https://github.com/pluja/Parasitter into dev-indep 2020-09-05 10:39:24 +02:00
pluja
be0b63e20b Update youtube-search-fork version 2020-09-05 10:39:07 +02:00
PLUJA
12304469b2
Update README.md 2020-09-05 10:01:10 +02:00
PLUJA
719b123233
Update SELF-HOSTING.md 2020-09-05 09:43:13 +02:00
PLUJA
1e11f86b91
Update SELF-HOSTING.md 2020-09-05 09:37:57 +02:00
PLUJA
de01997392
Update SELF-HOSTING.md 2020-09-05 09:37:28 +02:00
PLUJA
2dd6687052
Update README.md 2020-09-05 09:23:46 +02:00
PLUJA
f6f177b39a
Format readme 2020-09-05 09:14:19 +02:00
PLUJA
0a47f932c7
Update README.md 2020-09-05 09:11:25 +02:00
PLUJA
79ce184ca8
Update SELF-HOSTING.md 2020-09-05 09:10:32 +02:00
pluja
2cb9e5360d Merge branch 'dev-indep' of https://github.com/pluja/Parasitter into dev-indep 2020-09-05 08:56:49 +02:00
pluja
ff0fce2455 Old name on base.html 2020-09-05 08:56:32 +02:00
PLUJA
fa7d37bd1d
Update README.md 2020-09-05 08:52:30 +02:00
PLUJA
1a732e403a
Update .gitignore 2020-09-05 08:49:09 +02:00
PLUJA
29d9e3f2c8
Update SELF-HOSTING.md 2020-09-05 08:47:01 +02:00
PLUJA
c1dd78fdc6
Update SELF-HOSTING.md 2020-09-05 08:46:40 +02:00
pluja
7dcecfdf59 Fix database issues 2020-09-05 08:41:40 +02:00
pluja
80a105d736 Merge branch 'dev-indep' of https://github.com/pluja/Parasitter into dev-indep 2020-09-05 08:41:24 +02:00
PLUJA
3acc0dd8ac
Update SELF-HOSTING.md 2020-09-05 08:42:05 +02:00
pluja
48561eb465 Merge branch 'dev-indep' of https://github.com/pluja/Parasitter into dev-indep 2020-09-05 08:39:40 +02:00
pluja
bea7cd3896 Fix old name in settings and others 2020-09-04 23:55:56 +02:00
PLUJA
7f9458df3f
Update SELF-HOSTING.md 2020-09-04 23:09:52 +02:00
PLUJA
7c565afbe3
Update README.md 2020-09-04 23:07:30 +02:00
PLUJA
f854f212c6
Update SELF-HOSTING.md 2020-09-04 18:43:32 +02:00
PLUJA
8ec22cab99
Merge pull request #23 from SuperSandro2000/docker
Improve Dockerfile
2020-09-04 18:38:25 +02:00
pluja
5b44273b30 Undo last commit 2020-09-04 18:23:31 +02:00
pluja
0f8aa3c2d4 testing typo 2020-09-04 18:21:57 +02:00
Sandro Jäckel
0b61dbfe02
Add dockerignore to prevent cache busts
when doing git operations or changing the Dockerfile
2020-09-04 18:13:05 +02:00
Sandro Jäckel
a657ff33be
Convert CMD to JSON notation to make hadolint happy 2020-09-04 18:12:48 +02:00
Sandro Jäckel
e00c40d457
Combine RUNs
to reduce layers
2020-09-04 18:12:24 +02:00
pluja
eeacc51ec2 fix db for server 2020-09-04 17:47:41 +02:00
pluja
e66729485e Fix closed registrations logic 2020-09-04 17:07:44 +02:00
PLUJA
e6e6d0bd7e
Merge pull request #22 from Sn0wed1/dev-indep
Simplify Docker
2020-09-04 17:05:38 +02:00
PLUJA
a9e2672c6b
Update SELF-HOSTING.md 2020-09-04 17:04:36 +02:00
PLUJA
795ecc450c
Update SELF-HOSTING.md 2020-09-04 17:03:57 +02:00
Sn0wed1
90bc971f8a
Update Docker Hub Link 2020-09-04 10:00:32 -05:00
Sn0wed1
86cf44ece6
Update README.md
Added section with Docker Hub. This should allow people to run Yotter even if they can't build the Dockerfile on their computer.
2020-09-04 09:46:51 -05:00
PLUJA
add0a5d1d2
Update SELF-HOSTING.md 2020-09-04 16:42:37 +02:00
Sn0wed1
bba778cc12
Merge pull request #1 from pluja/dev-indep
Rebase
2020-09-04 09:29:06 -05:00
PLUJA
7be48e3f4a
Update SELF-HOSTING.md 2020-09-04 16:26:44 +02:00
PLUJA
c428cc7658
Update SELF-HOSTING.md 2020-09-04 16:02:49 +02:00
PLUJA
4fb8e0ae77
Update routes.py 2020-09-04 15:59:16 +02:00
PLUJA
5c9d19f5d7
Merge pull request #21 from 0ihgk1uVBLlTBzVo7F9B/dev-indep
Add option to import subscription data from newpipe, youtube and freetube.
2020-09-04 15:58:26 +02:00
PLUJA
ea1aa6e9f8
Update SELF-HOSTING.md 2020-09-04 15:29:11 +02:00
PLUJA
61ecd5bdee
Update SELF-HOSTING.md 2020-09-04 15:28:17 +02:00
0ihgk1uVBLlTBzVo7F9B
bf600c1a16 add option to import freetube subscriptions 2020-09-04 15:05:32 +02:00
0ihgk1uVBLlTBzVo7F9B
ae7aefb5c2 add option to import youtube subscriptions 2020-09-04 14:57:45 +02:00
0ihgk1uVBLlTBzVo7F9B
c572662112 add option to import newpipe subscriptions 2020-09-04 14:42:35 +02:00
0ihgk1uVBLlTBzVo7F9B
214500e707 set registrations to true because there is no key in the config file 2020-09-04 14:26:27 +02:00
PLUJA
b4a3326ce4
Update SELF-HOSTING.md 2020-09-04 14:01:55 +02:00
PLUJA
9b5f7cae0a
Update SELF-HOSTING.md 2020-09-04 13:54:44 +02:00
PLUJA
f07c74919d
Update SELF-HOSTING.md 2020-09-04 12:40:59 +02:00
PLUJA
e3c1f000b9
Update README.md 2020-09-04 12:16:39 +02:00
PLUJA
2c03c982ce
Update SELF-HOSTING.md 2020-09-04 12:16:16 +02:00
pluja
fb66834c01 ADD readme 2020-09-04 12:12:23 +02:00
pluja
3b9607118a asldfs 2020-09-04 12:11:42 +02:00
pluja
3424b26f9b Add instructions for self-hosting on a server 2020-09-04 12:07:29 +02:00
PLUJA
e5407d2e4e
Update README.md 2020-09-04 10:13:38 +02:00
PLUJA
e73833f2a6
Update README.md 2020-09-04 10:09:39 +02:00
PLUJA
05b40202c7
Update README.md 2020-09-04 10:01:08 +02:00
pluja
c6d5bd1011 Remove some emojis from readme 2020-09-04 08:35:21 +02:00
pluja
b56bbf884e Fix Readme typos 2020-09-04 08:33:01 +02:00
pluja
dc357f3af9 Fix Readme formatting 2020-09-04 08:31:47 +02:00
pluja
fdf3824bdd Fix Readme formatting 2020-09-04 08:29:52 +02:00
pluja
71e7fe9c97 Update changelog 2020-09-04 08:28:28 +02:00
pluja
2cd36a7df8 Update readme 2020-09-04 08:26:36 +02:00
pluja
6153aa1b2a Add server config file 2020-09-04 08:21:35 +02:00
pluja
f7b0c3df40 #18: Proxy more images 2020-09-04 07:54:04 +02:00
pluja
6865455e7c Fix #18: Proxy images through Yotter 2020-09-04 07:42:01 +02:00
PLUJA
6f0c62aa78
Merge pull request #19 from Sn0wed1/dev-indep
Adds Dockerfile
2020-09-04 07:32:40 +02:00
Sn0wed1
d4bc7f5a61
Update README.md
Updates README.md to include instructions for Docker.
2020-09-03 15:44:43 -05:00
Sn0wed1
9a394e5025
Adds a Dockerfile 2020-09-03 15:27:08 -05:00
pluja
38746cc0d3 Add cited tweets to user feeds 2020-09-01 21:03:51 +02:00
PLUJA
12895b2eb0
Update README.md 2020-09-01 20:20:30 +02:00
PLUJA
25bfd44e77
Add Liberapay donating method. 2020-09-01 20:16:35 +02:00
PLUJA
af0e8ee322
Add Why 2020-09-01 19:59:27 +02:00
pluja
e1a96ebea9 Merge branch 'dev-indep' of https://github.com/pluja/Parasitter into dev-indep 2020-08-31 13:29:12 +02:00
pluja
c8ef38ffeb Improve UI on mobile devices 2020-08-31 13:28:57 +02:00
PLUJA
9cfe24b81e
Update README.md 2020-08-31 13:20:43 +02:00
PLUJA
1297a74f10
Update README.md 2020-08-31 10:07:59 +02:00
PLUJA
c80fc3bca5
Update README.md 2020-08-31 10:03:33 +02:00
PLUJA
3a8859eb0f
Fix typos 2020-08-31 10:01:27 +02:00
PLUJA
f0384dd6c2
Update README.md 2020-08-31 09:59:13 +02:00
PLUJA
5cc729cffc
Update README.md 2020-08-31 09:57:57 +02:00
PLUJA
d48eccbe4b
Add screenshots 2020-08-31 09:55:37 +02:00
pluja
7a53ea9258 Remove misc folder 2020-08-31 09:46:51 +02:00
PLUJA
a0e1e9265b
Add screenshots 2020-08-31 09:45:15 +02:00
pluja
7366bad30a Merge branch 'dev-indep' of https://github.com/pluja/Parasitter into dev-indep 2020-08-31 09:38:51 +02:00
pluja
d1f090dab6 Add new error pages and fix debug printing 2020-08-31 09:38:35 +02:00
PLUJA
eb385cf167
Update .gitignore 2020-08-31 09:27:42 +02:00
PLUJA
df34da2d6c
Create README.md 2020-08-31 09:27:06 +02:00
PLUJA
d6e895a7fb
Add banner 2020-08-30 12:43:17 +02:00
pluja
85013bbc89 Merge branch 'dev-indep' of https://github.com/pluja/Parasitter into dev-indep 2020-08-30 12:40:36 +02:00
pluja
22d2a73d79 Add banner 2020-08-30 12:40:20 +02:00
PLUJA
5479fec506
Update README.md 2020-08-30 12:30:41 +02:00
PLUJA
d353a8813d
Update README.md 2020-08-30 12:00:47 +02:00
pluja
78efa0e85c Change README name 2020-08-30 11:58:01 +02:00
PLUJA
b947874c2a
Update README.md 2020-08-30 11:57:12 +02:00
pluja
f3ec922540 Merge branch 'dev-indep' of https://github.com/pluja/Parasitter into dev-indep 2020-08-30 11:55:29 +02:00
pluja
d8b705f04e Add new logo 2020-08-30 11:55:16 +02:00
PLUJA
38ab972666
Update README.md 2020-08-30 11:48:14 +02:00
pluja
95611d0fe6 Merge branch 'dev-indep' of https://github.com/pluja/Parasitter into dev-indep 2020-08-30 11:46:56 +02:00
PLUJA
53efeb5316
Update README.md 2020-08-30 11:47:05 +02:00
pluja
87bd3b8ff6 Add new logo 2020-08-30 11:46:42 +02:00
pluja
54f3fc2ca6 Youtube: Format video descriptions 2020-08-30 10:05:16 +02:00
pluja
0f4d6e163e Merge branch 'dev-indep' of https://github.com/pluja/Parasitter into dev-indep 2020-08-30 01:17:07 +02:00
pluja
5e1d347711 add closed registrations 2020-08-30 01:16:51 +02:00
pluja
c82640991f add closed registrations 2020-08-30 01:15:48 +02:00
PLUJA
b230a95b73
Update README.md 2020-08-30 01:12:02 +02:00
PLUJA
c478fc9eff
Update README.md 2020-08-30 01:11:43 +02:00
PLUJA
8f8f011f2e
Update README.md 2020-08-30 01:03:21 +02:00
PLUJA
502489d553
Update README.md 2020-08-30 00:57:58 +02:00
PLUJA
eba78c961a
Add LICENSE 2020-08-30 00:55:17 +02:00
PLUJA
5ea102bf49
Update README.md 2020-08-30 00:48:03 +02:00
PLUJA
93f9e6491c
Update README.md 2020-08-30 00:47:05 +02:00
PLUJA
0eee40cde6
Update README.md 2020-08-30 00:45:55 +02:00
PLUJA
6efcd16932
Update README.md 2020-08-30 00:40:08 +02:00
PLUJA
bc0b245b69
Update README.md 2020-08-30 00:34:18 +02:00
PLUJA
e4c0fc2528
Update README.md 2020-08-30 00:30:30 +02:00
PLUJA
592c96cdb4
Update README.md 2020-08-30 00:27:14 +02:00
pluja
47cd3c0732 Update changelog 2020-08-29 22:36:42 +02:00
pluja
70c25f097f Video seeking is now possible 2020-08-29 22:35:29 +02:00
pluja
b06f96f9c4 Fixed: spaces breaking twitter search 2020-08-27 23:56:14 +02:00
pluja
a5a8b78ba2 Fix typo 2020-08-27 23:38:16 +02:00
pluja
6aa6c3e530 Update changelog 2020-08-27 23:30:34 +02:00
pluja
386a80f118 Twitter quotations are now shown 2020-08-27 23:25:08 +02:00
pluja
6b1ea94078 New video UI 2020-08-27 16:04:14 +02:00
pluja
7a97303854 Update requirements 2020-08-27 12:54:41 +02:00
pluja
5d94b677a8 Improve 'following' UI 2020-08-27 12:27:17 +02:00
pluja
b56e5a1fae Allow /user/<username> url on youtube 2020-08-27 12:07:59 +02:00
pluja
16bc0acfd0 Fix typos 2020-08-27 11:05:45 +02:00
pluja
6664042d91 Add empty feed 2020-08-27 10:56:00 +02:00
PLUJA
5003bcc8b5
Update CHANGELOG.md 2020-08-27 10:28:15 +02:00
PLUJA
681ddf4cb8
Update README.md 2020-08-27 10:24:52 +02:00
PLUJA
d30f15ad39
Update README.md 2020-08-27 10:21:23 +02:00
PLUJA
7de329952e
Update README.md 2020-08-27 10:20:52 +02:00
PLUJA
be34672846
Update README.md 2020-08-27 10:20:37 +02:00
PLUJA
0085273873
Update README.md 2020-08-27 10:20:02 +02:00
PLUJA
d7632a6b07
Update README.md 2020-08-27 10:19:05 +02:00
pluja
1c2a9169e6 Fix #13 2020-08-27 10:15:20 +02:00
pluja
454574ce49 Update changelog 2020-08-27 10:10:05 +02:00
pluja
ad850de912 Improved Twitter search 2020-08-27 10:07:48 +02:00
pluja
1c5c09715f Numerize twitter followers 2020-08-26 23:13:54 +02:00
pluja
71b3bb6f0c Hide posts older than 15 days in main feed 2020-08-26 22:44:18 +02:00
pluja
022bf2d5ff Improve Twitter efficiency and UI 2020-08-26 22:13:51 +02:00
pluja
4c0406cb24 Merge RT and no-RT posts into one file 2020-08-26 20:49:45 +02:00
pluja
3b98c71396 UI fixes 2020-08-26 19:13:18 +02:00
pluja
9762c214c6 Remove tweet feed overflow 2020-08-26 18:52:20 +02:00
pluja
a64ef01ad7 Change logout text for icon 2020-08-26 09:51:54 +02:00
pluja
8150eedddf Merge branch 'dev-indep' of https://github.com/pluja/Parasitter into dev-indep 2020-08-26 09:41:43 +02:00
pluja
eb0042a694 Add welcome page 2020-08-26 09:41:34 +02:00
PLUJA
47c950a188
Update README.md 2020-08-26 08:42:39 +02:00
PLUJA
ba3b7c14ef
Update README.md 2020-08-26 08:41:38 +02:00
PLUJA
03e3204ea7
Update README.md 2020-08-26 08:35:23 +02:00
PLUJA
4ddbb7ecec
Update README.md 2020-08-26 08:14:36 +02:00
PLUJA
f7c1200159
Update CHANGELOG.md 2020-08-25 13:36:48 +02:00
PLUJA
3489c6f922
Update README.md 2020-08-25 13:35:47 +02:00
pluja
43f9d7afeb Update youtube-search-fork version 2020-08-25 13:20:45 +02:00
pluja
77c450f689 Fixed: channel links on channel videos not working 2020-08-25 13:20:28 +02:00
pluja
ae2a4e86a9 Several upgrades 2020-08-24 15:31:56 +02:00
pluja
7b28f482b1 Update changelog 2020-08-24 15:30:30 +02:00
pluja
f3e60200f9 Remove email from register form 2020-08-24 12:48:44 +02:00
pluja
41e78f36f8 Twitter follow logic and DB rewrite + Youtube logic improvements 2020-08-24 12:34:17 +02:00
pluja
149643721e Youtube: Fix channel links app-wide 2020-08-23 21:33:23 +02:00
pluja
f515c9aab7 Twitter: New UI for following management 2020-08-23 20:59:04 +02:00
pluja
a1e558cb69 Twitter: Move following management to front 2020-08-23 18:18:24 +02:00
pluja
bf1c91fc28 Update changelog 2020-08-23 17:38:06 +02:00
pluja
66fa65dfca Follow/Unfollow from channel page 2020-08-23 17:36:00 +02:00
pluja
df7a62649b Update links and filename 2020-08-23 17:27:12 +02:00
pluja
a0ccc2aa4c Update changelog 2020-08-23 11:06:28 +02:00
pluja
deb0043244 Channel view: Channel info + videos 2020-08-23 11:03:49 +02:00
pluja
93f71a8ea8 Add /channel/<id> route and build header 2020-08-23 10:20:33 +02:00
pluja
7c78ab8d96 Delete 2020-08-23 08:25:34 +02:00
pluja
e655122eea Several upgrades and fixes 2020-08-22 20:56:04 +02:00
pluja
c9e7d64ef0 Fix issue with video playing 2020-08-17 11:18:00 +02:00
pluja
661520b689 Merge branch 'dev-indep' of https://github.com/pluja/Parasitter into dev-indep 2020-08-17 11:15:15 +02:00
pluja
6c6478bb82 Remove debug prints to Stdout 2020-08-17 11:15:08 +02:00
PLUJA
b65e86fb1a
Update README.md 2020-08-17 11:06:07 +02:00
PLUJA
74c86b1865
Update README.md 2020-08-17 11:04:53 +02:00
PLUJA
dec952a6fc
Update CHANGELOG.md 2020-08-17 11:04:10 +02:00
pluja
07eb4aef43 Merge branch 'dev-indep' of https://github.com/pluja/Parasitter into dev-indep 2020-08-17 11:02:47 +02:00
pluja
41f86a6892 Search no longer depends on Invidious 2020-08-17 11:02:18 +02:00
PLUJA
c2d40c8a6a
Update README.md 2020-08-17 09:29:20 +02:00
pluja
b82ba31661 Set ydl to quiet + fixes 2020-08-17 08:26:56 +02:00
PLUJA
839df50e37
Update README.md 2020-08-16 22:32:18 +02:00
pluja
70630e939e Improve loading times, improve proxy, remove invidious links 2020-08-16 21:47:18 +02:00
PLUJA
809dd1ad36
Update README.md 2020-08-16 21:44:07 +02:00
PLUJA
d3412682ed
Update README.md 2020-08-16 16:49:02 +02:00
PLUJA
32d4e4ba2a
Update CHANGELOG.md 2020-08-16 16:47:50 +02:00
PLUJA
e582affd1e
Update CHANGELOG.md 2020-08-16 16:47:35 +02:00
pluja
7631e66eb7 Merge branch 'dev-indep' of https://github.com/pluja/Parasitter into dev-indep 2020-08-16 16:45:33 +02:00
pluja
cc588e7108 Use Video.js player 2020-08-16 16:45:13 +02:00
PLUJA
0f73382d1e
Update CHANGELOG.md 2020-08-16 15:42:26 +02:00
PLUJA
1b218c8581
Update README.md 2020-08-16 15:38:44 +02:00
PLUJA
9c473e2609
Update README.md 2020-08-16 15:36:13 +02:00
pluja
382c8cb981 Merge branch 'dev-indep' of https://github.com/pluja/Parasitter into dev-indep 2020-08-16 15:20:37 +02:00
pluja
d9f047039a Video player proxy working 2020-08-16 15:20:05 +02:00
PLUJA
4d45e08c4b
Update README.md 2020-08-04 23:25:40 +02:00
pluja
d7543a98ed Youtube: Break dependance with Invidious. Proxy not working. 2020-08-04 23:18:59 +02:00
PLUJA
6c4444bd5c
Update README.md 2020-08-04 10:01:48 +02:00
pluja
e5728e83d4 Youtube-dl 2020-08-04 09:36:36 +02:00
106 changed files with 7566 additions and 1084 deletions

18
.circleci/config.yml Normal file
View File

@ -0,0 +1,18 @@
version: 2.1
orbs:
python: circleci/python@1.0.0
jobs:
build-and-test:
executor: python/default
steps:
- checkout
- python/install-packages:
pkg-manager: pip
# TODO: Tests
workflows:
main:
jobs:
- build-and-test

11
.dockerignore Normal file
View File

@ -0,0 +1,11 @@
.circleci
.git
.github
.gitignore
cache
Dockerfile
docker-compose.yml
LICENSE
*.md
dockerhash.txt
app/static

37
.github/ISSUE_TEMPLATE/bug_report.md vendored Normal file
View File

@ -0,0 +1,37 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: bug
assignees: ''
---
**Describe the bug**
A clear and concise description of what the bug is.
**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error
**Expected behavior**
A clear and concise description of what you expected to happen.
**Screenshots**
If applicable, add screenshots to help explain your problem.
**Desktop (please complete the following information):**
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]
**Smartphone (please complete the following information):**
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]
**Additional context**
Add any other context about the problem here.

View File

@ -0,0 +1,20 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: feature request
assignees: ''
---
**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
**Describe the solution you'd like**
A clear and concise description of what you want to happen.
**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.
**Additional context**
Add any other context or screenshots about the feature request here.

12
.github/dependabot.yml vendored Normal file
View File

@ -0,0 +1,12 @@
version: 2
updates:
# Maintain dependencies for GitHub Actions
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
# Maintain dependencies for pip
- package-ecosystem: "pip"
directory: "/"
schedule:
interval: "daily"

133
.github/workflows/docker-build.yml vendored Normal file
View File

@ -0,0 +1,133 @@
name: Docker Multi-Architecture Build
on:
push:
paths-ignore:
- "**.md"
branches:
- dev-indep
jobs:
cpython-build-docker:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2.3.4
with:
fetch-depth: 0
- name: Set up QEMU
uses: docker/setup-qemu-action@v1.2.0
with:
platforms: all
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v1.5.1
with:
version: latest
- name: Login to DockerHub
uses: docker/login-action@v1.10.0
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Get hash of latest image
run: docker pull python:3-alpine && docker inspect --format='{{index .RepoDigests 0}}' python:3-alpine > dockerhash.txt
- name: Write the current version to a file
run: "{ git describe --tags --abbrev=0 & date +\"%d-%m-%y\" & git rev-list HEAD --max-count=1 --abbrev-commit;} > version.txt"
- name: cache docker cache
uses: actions/cache@v2.1.6
with:
path: ${{ github.workspace }}/cache
key: ${{ runner.os }}-docker-cpython-${{ hashFiles('**/requirements.txt') }}-${{ hashFiles('**/dockerhash.txt') }}
restore-keys: |
${{ runner.os }}-docker-cpython-
- name: Build and push
uses: docker/build-push-action@v2.6.1
with:
context: .
file: ./Dockerfile
platforms: linux/amd64,linux/arm64
push: true
tags: ytorg/yotter:latest
cache-from: type=local,src=cache
cache-to: type=local,dest=cache
pypy-build-docker:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2.3.4
with:
fetch-depth: 0
- name: Set up QEMU
uses: docker/setup-qemu-action@v1.2.0
with:
platforms: all
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v1.5.1
with:
version: latest
- name: Login to DockerHub
uses: docker/login-action@v1.10.0
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Get hash of latest image
run: docker pull pypy:3-slim-buster && docker inspect --format='{{index .RepoDigests 0}}' pypy:3-slim-buster > dockerhash.txt
- name: Write the current version to a file
run: "{ git describe --tags --abbrev=0 & date +\"%d-%m-%y\" & git rev-list HEAD --max-count=1 --abbrev-commit;} > version.txt"
- name: cache docker cache
uses: actions/cache@v2.1.6
with:
path: ${{ github.workspace }}/cache
key: ${{ runner.os }}-docker-pypy-${{ hashFiles('**/requirements.txt') }}-${{ hashFiles('**/dockerhash.txt') }}
restore-keys: |
${{ runner.os }}-docker-pypy-
- name: Build and push
uses: docker/build-push-action@v2.6.1
with:
context: .
file: ./pypy.Dockerfile
platforms: linux/amd64,linux/arm64
push: true
tags: ytorg/yotter:pypy
cache-from: type=local,src=cache
cache-to: type=local,dest=cache
nginx-build-docker:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2.3.4
with:
fetch-depth: 0
- name: Set up QEMU
uses: docker/setup-qemu-action@v1.2.0
with:
platforms: all
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v1.5.1
with:
version: latest
- name: Login to DockerHub
uses: docker/login-action@v1.10.0
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Get hash of latest image
run: docker pull nginx:mainline-alpine && docker inspect --format='{{index .RepoDigests 0}}' nginx:mainline-alpine > dockerhash.txt
- name: Write the current version to a file
run: "{ git describe --tags --abbrev=0 & date +\"%d-%m-%y\" & git rev-list HEAD --max-count=1 --abbrev-commit;} > version.txt"
- name: cache docker cache
uses: actions/cache@v2.1.6
with:
path: ${{ github.workspace }}/cache
key: ${{ runner.os }}-docker-nginx-${{ hashFiles('**/dockerhash.txt') }}
restore-keys: |
${{ runner.os }}-docker-nginx-
- name: Build and push
uses: docker/build-push-action@v2.6.1
with:
context: .
file: ./Dockerfile
platforms: linux/amd64,linux/arm64
push: true
tags: ytorg/nginx:latest
cache-from: type=local,src=cache
cache-to: type=local,dest=cache

16
.gitignore vendored
View File

@ -144,4 +144,18 @@ dmypy.json
# pytype static type analyzer
.pytype/
# End of https://www.toptal.com/developers/gitignore/api/python
# Added
data_export.json
.env
.envo
SELF-HOSTING.md
README.md
/misc
misc/*
/misc/*
app/cache/*
app/cache
./app/cache/*
./app/cache
.github/ISSUE_TEMPLATE/
.github/ISSUE_TEMPLATE/*

View File

@ -1,63 +0,0 @@
## Unreleased
- [ ] Import data from JSON file.
- [ ] Database: Fix following logic.
- [ ] Configuration page: Disable retweets.
- [ ] Configuration page: Disable loading media content.
- [ ] Configuration page: Dark mode
##### Long term
- See cited posts (if any).
- Share a tweet.
- Play media from Parasitter.
- Create following lists.
## [0.2.0] - 2020-07-29
### Added
- [x] Export your followed accounts (Youtube and Twitter) to a JSON file
- [x] Youtube: follow Youtube accounts.
- [x] Youtube: Manage suscriptions
- [x] Youtube: Show video time duration
### Changed
- [x] Efficiency improvements. ~1s reduction on fetching time.
- [x] Minor UI changes.
### Fixed
- [x] Saving posts didn't work on 2020.07.24 update.
## [0.1.0] - 2020-07-19
### Added
- [x] Ability to save posts.
- [x] Ability to remove a saved post.
- [x] Error pages: Error 500, Error 405
- [x] Open the original post on Nitter.
### Changed
- [x] Significant improvement on fetching feed efficiency - Parallelism applied.
- [x] Changelogs now using [Keep a changelog](https://keepachangelog.com/en/1.0.0/) style.
### Fixed
- [x] "Saved" menu element logged out instead of showing saved posts.
## [0.0.2] - 2020-07-14
### Added
- [x] First implementation of saved posts - Not working yet.
- [x] Error 404 page.
- [x] Empty feed now shows a notice.
- [x] Requirements.txt file for a better installation and update experience.
- [x] Pinned posts are now marked as it.
### Changed
- [x] More flexible user search. Search by username and show a list of possible results.
- [x] Minor UI fixes.
- [x] Fetching of accounts in a slightly more efficient way.
## [0.0.1] - 2020-07-13
### Added
- [x] Ability to follow accounts.
- [x] Ability to unfollow accounts.
- [x] Ability to register users.
- [x] Ability to visit a user profile.
- [x] Search a user by its exact username.

37
Dockerfile Normal file
View File

@ -0,0 +1,37 @@
FROM python:3-alpine AS base
# Image to Build Dependencies
FROM base AS builder
WORKDIR /usr/src/app
COPY ./requirements.txt /usr/src/app
# Build Dependencies
RUN apk --no-cache add gcc musl-dev libffi-dev openssl-dev libxml2-dev libxslt-dev file llvm-dev make g++ cargo rust
# Python Dependencies
RUN pip install --no-cache-dir --prefix=/install wheel cryptography gunicorn pymysql
RUN pip install --no-cache-dir --prefix=/install -r requirements.txt
# Runtime Environment Image
FROM base
WORKDIR /usr/src/app
# Runtime Dependencies
RUN apk --no-cache add libxml2 libxslt
COPY --from=builder /install /usr/local
COPY . .
RUN flask db init \
&& flask db migrate \
&& flask db upgrade
CMD flask db stamp head \
&& flask db migrate \
&& flask db upgrade \
&& gunicorn -b 0.0.0.0:5000 -w 4 yotter:app
EXPOSE 5000

619
LICENSE Normal file
View File

@ -0,0 +1,619 @@
GNU AFFERO GENERAL PUBLIC LICENSE
Version 3, 19 November 2007
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The GNU Affero General Public License is a free, copyleft license for
software and other kinds of works, specifically designed to ensure
cooperation with the community in the case of network server software.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
our General Public Licenses are intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.
Developers that use our General Public Licenses protect your rights
with two steps: (1) assert copyright on the software, and (2) offer
you this License which gives you legal permission to copy, distribute
and/or modify the software.
A secondary benefit of defending all users' freedom is that
improvements made in alternate versions of the program, if they
receive widespread use, become available for other developers to
incorporate. Many developers of free software are heartened and
encouraged by the resulting cooperation. However, in the case of
software used on network servers, this result may fail to come about.
The GNU General Public License permits making a modified version and
letting the public access it on a server without ever releasing its
source code to the public.
The GNU Affero General Public License is designed specifically to
ensure that, in such cases, the modified source code becomes available
to the community. It requires the operator of a network server to
provide the source code of the modified version running there to the
users of that server. Therefore, public use of a modified version, on
a publicly accessible server, gives the public access to the source
code of the modified version.
An older license, called the Affero General Public License and
published by Affero, was designed to accomplish similar goals. This is
a different license, not a version of the Affero GPL, but Affero has
released a new version of the Affero GPL which permits relicensing under
this license.
The precise terms and conditions for copying, distribution and
modification follow.
TERMS AND CONDITIONS
0. Definitions.
"This License" refers to version 3 of the GNU Affero General Public License.
"Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.
"The Program" refers to any copyrightable work licensed under this
License. Each licensee is addressed as "you". "Licensees" and
"recipients" may be individuals or organizations.
To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy. The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.
A "covered work" means either the unmodified Program or a work based
on the Program.
To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.
To "convey" a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
1. Source Code.
The "source code" for a work means the preferred form of the work
for making modifications to it. "Object code" means any non-source
form of a work.
A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.
The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.
The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.
The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.
The Corresponding Source for a work in source code form is that
same work.
2. Basic Permissions.
All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force. You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright. Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under
the conditions stated below. Sublicensing is not allowed; section 10
makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.
4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.
b) The work must carry prominent notices stating that it is
released under this License and any conditions added under section
7. This requirement modifies the requirement in section 4 to
"keep intact all notices".
c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:
a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the
Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.
d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided
you inform other peers where the object code and Corresponding
Source of the work are being offered to the general public at no
charge under subsection 6d.
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling. In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage. For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product. A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.
"Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source. The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed. Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or
authors of the material; or
e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions of
it) with contractual assumptions of liability to the recipient, for
any liability that these contractual assumptions directly impose on
those licensors and authors.
All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or
run a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
11. Patents.
A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License. You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all. For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.
13. Remote Network Interaction; Use with the GNU General Public License.
Notwithstanding any other provision of this License, if you modify the
Program, your modified version must prominently offer all users
interacting with it remotely through a computer network (if your version
supports such interaction) an opportunity to receive the Corresponding
Source of your version by providing access to the Corresponding Source
from a network server at no charge, through some standard or customary
means of facilitating copying of software. This Corresponding Source
shall include the Corresponding Source for any work covered by version 3
of the GNU General Public License that is incorporated pursuant to the
following paragraph.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the work with which it is combined will remain governed by version
3 of the GNU General Public License.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of
the GNU Affero General Public License from time to time. Such new versions
will be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the
Program specifies that a certain numbered version of the GNU Affero General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU Affero General Public License, you may choose any version ever published
by the Free Software Foundation.
If the Program specifies that a proxy can decide which future
versions of the GNU Affero General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS

273
README.md
View File

@ -1,153 +1,186 @@
# Parasitter
<p align="center"> <img width="150" src="app/static/img/logo.png"> </img></p>
<p align="center"> Twitter and Youtube via RSS with privacy </p>
<br>
## This project is no longer maintained. Visit [this repo](https://github.com/TeamPiped/Piped) for an alternative.
Parasitter allows you to follow your favorite Twitter and YouTube accounts with full privacy. Parasitter uses [Nitter's](https://nitter.net/) and [Invidious](invidio.us) rss feeds in order to gather the latest content from your favourite accounts and builds a *beautiful* feed so you can read them. We will never connect you to Twitter or YouTube in any way, so your privacy is safe when using Parasitter. Parasitter is written in Python and Flask and uses Semantic-UI as its CSS framework.
<p align="center"> <img width="700" src="app/static/img/banner.png"> </img></p>
<p align="center">
<a href="https://www.gnu.org/licenses/gpl-3.0"><img alt="License: GPL v3" src="https://img.shields.io/badge/License-AGPLv3-blue.svg"></img></a>
<a href="https://github.com/pluja/Yotter"><img alt="Development state" src="https://img.shields.io/badge/State-Beta-blue.svg"></img></a>
<a href="https://github.com/pluja/Yotter/pulls"><img alt="Pull Requests Welcome" src="https://img.shields.io/badge/PRs-Welcome-green.svg"></img></a>
<a href="https://git.kavin.rocks/kavin/Yotter"><img alt="Mirror 1" src="https://img.shields.io/badge/Mirror1-git.kavin.rocks-teal"></img></a>
<a href="https://84.38.177.154/libremirrors/ytorg/Yotter"><img alt="Mirror 2" src="https://img.shields.io/badge/Mirror2-git.rip-purple"></img></a>
</p>
Parasitter doesn't try to compete with Nitter nor Invidious. It serves as a complement, as it beneficiates from them. Parasitter is not a Twitter viewer as Nitter is or a YouTube frontend as Invidious. Instead Parasitter gathers all your accounts in one place so you can stay tuned with their latest content.
Yotter allows you to follow and gather all the content from your favorite Twitter and YouTube accounts in a *beautiful* feed so you can stay up to date without compromising your privacy at all. Yotter is written with Python and Flask and uses Semantic-UI as its CSS framework.
Parasitter is possible thanks to several open-source projects that are listed on the [Powered by](#powered-by) section. Make sure to check out those awesome projects!
Yotter is possible thanks to several open-source projects that are listed on the [Powered by](#powered-by) section. Make sure to check out those awesome projects!
## Index:
# Index:
* [Why](#why)
* [Features](#features)
* [Security](#security)
* [Privacy](#privacy)
* [Self hosting](#self-hosting)
* [Local](#local)
* [Update](#updating-to-new-versions)
* [Server](#server)
* [Roadmap](#roadmap)
* [FAQ](#FAQ)
* [Privacy and Security](#privacy)
* [Public instances](#public-instances)
* [Self hosting](https://github.com/ytorg/Yotter/blob/dev-indep/SELF-HOSTING.md)
* [Contributing and contact](#contributing)
* [Powered by](#powered-by)
* [Donate](#donate-)
* [Donate](#donate)
* [Screenshots](#screenshots)
* [Redirect Extensions](#redirect)
## Features:
* No JavaScript.
* 0 connections to Twitter or Youtube.
* Uses RSS feeds (could be expanded to more social networks)
* Follow Twitter accounts.
* Follow Youtube accounts.
* Save your favourite Tweets.
* Save your favourite Youtube videos [Coming soon!]
* Tor-friendly.
* Terminal-friendly.
* Easy 1 minute self-hosting deploy.
* No need for domain, runs locally.
> And many more to come!
# Why
Youtube and Twitter are well-known by their invasive and data-stealing *'privacy policies'*. You give them a **lot** of data; from ideology to music taste, your likes and dislikes, your free-time schedule, and much more than you think. This much data gives such companies a control over you that you would never thought.
## Security
Only the hash of your password is stored on the database. Also no personal information of any kind is kept on the app itself, if a hacker gets access to it only thing they could do would be to follow/unfollow some accounts.
With the *particular* data about you, they can get money from the highest bidder and target advertisements. This could seem *not-as-bad* but it gets worse. They can sell this data to some company that, with such knowledge about you, could harm your future in a way you can't imagine. What if you are watching self-help videos on Youtube and this data ends on you insurance hands? Would they raise your fee because they consider you are not *emotionally stable*? We can think of thousands of examples like this, where the data ends in the wrong hands and harms you in an unexpected way.
I always recommend self-hosting, as you will be the only person with access to the data.
Further more, they don't care about **what you in particular watch**, this is only sold to the highest bidder who then may or may not do the harm. What they care more about is **what people watch** this is the important data and the one that allows to manipulate, bias, censor, etc.
## Privacy
Parasitter cares about your privacy, and for this it will never make any connection to Twitter or Youtube. We make use pf rss feeds to fetch all the tweets from your followed accounts. If you want to use a specific Nitter or Invidious instance you can replace it on the file `app/routes.py`.
So we need platforms and spaces where we can freely watch and listen content without these watchful eyes upon us. Ideally, everyone would use a free (as in freedom) and decentralized platform like [Peertube](https://joinpeertube.org/), [Odysee](https://odysee.com/), [Mastodon](https://joinmastodon.org/) or [Pleroma](https://pleroma.social/) but things are not like this. The main multimedia content factory is Youtube and the microblogging king is Twitter. So we will do whatever is possible to be able to watch and read the content and avoid the surveillance that seeks us these days. We will resist.
It is always recommended to set up a self-hosted instance. It is quite easy and conveninent and will give you full control over your data. The only data that is stored on the Database is:
* Hash of the password
# Features:
- [x] No Ads.
- [x] No Javascript needed*
- [x] Minimalist.
- [x] Search on Twitter and Youtube.
- [x] Zero connections to Google/Twitter on the client.
- [x] Follow Twitter accounts.
- [x] Follow Youtube accounts.
- [x] Play Youtube videos on background on Android.
- [x] Play only audio from youtube to save data.
- [x] Save your favourite Tweets.
- [x] Tor-friendly.
- [x] Terminal-browser friendly.
- [x] Fair non-adictive UX - No recommendations, no trending, no tops. Just your feed and your searches.
*Video player is VideoJS, which uses JavaScript. But if JavaScript is disabled Yotter still works perfectly and uses the default HTML video player.
### Roadmap
The following features are planned to be implemented in the near future:
* [ ] Improve performance and efficiency
#### Youtube specific:
* [ ] Subtitles
* [ ] > 720p Quality
* [ ] Save youtube videos
* [ ] Support for live streams
#### Twitter specific:
* [ ] Translations
# FAQ
### What's the difference between this and Invidious?
At first I started working on this project as a solution for following Twitter accounts (a thing that can't be done with Nitter) and getting a Twitter-like feed. Weeks later the leader of Invidious, Omar Roth, announced that he was stepping away from the project. As an Invidious active user, this made me think that a new alternative was needed for the community and also an alternative with an easier programming language for most people (as Invidious is written in Crystal). So I started developing a '*written-in-python Invidious alternative*' and it went quite well.
I hope that this project can prosper, gain contributors, new instances and create a good community around it.
### Why do I have to register to use Yotter?
Registering has two main reasons:
1. Yotter is in a **beta** state. This means that we will be incrementally increasing the capacity of the servers so we can empirically know how many users a Yotter server can handle. Also, there is no **big server** with capacity for handling any arbitrary ammount of users and serving video/data to those at the moment. For this, we decided to have a registration form so we could limit the users.
2. Yotter allows users to follow accounts and have a custom feed. This needs an account to save your followed users and generate a feed.
Admins are allowed to remove restrictions on any page they want. [Check this section](https://github.com/ytorg/Yotter/blob/dev-indep/SELF-HOSTING.md#removing-log-in-restrictions) to learn how.
If you want to use Yotter, it is recommended to self-host your own instance. You can use it for personal use or open it to the world. Self-hosting makes Yotter stronger and gives you full power. See [self hosting guide](https://github.com/ytorg/Yotter/blob/dev-indep/SELF-HOSTING.md).
### Will you ever implement video recommendations, trending videos, etc?
No. From my point of view, these are toxic features. I, and every user, should be using all *social media* to get the content **they** want. Recomendations, trending, autoplay next video, etc. are all features designed to trap users on using the app, to make them forget about the time spent there and to create an addiction to it. No, I won't implement any toxic features on Yotter. Yotter will keep the UI clean, fast and simple.
You get your feed from followed accounts and you can search for any video you like. Only thing I would consider implementing would be some kind of page where you can ask for recommendations for a particular video. This way the user would, voluntarily, ask for the recommendations rather than having a temptation to click on a new, youtube-bias-recommended video.
Please read: [1](https://arxiv.org/abs/1912.11211), [2](https://medium.com/dataseries/how-youtube-is-addictive-259d5c575883), [3](https://www.their.tube/), [4](https://www.sciencedirect.com/science/article/pii/S1386505619308743?via%3Dihub)
# Privacy
#### Connections
Yotter cares about your privacy, and for this it will never make any connection to Twitter or Youtube on the client. Every request is proxied through the Yotter server; video streaming, photos, data gathering, scrapping, etc.
The Yotter server connects to Google (Youtube) and Nitter in order to gather all the necessary data. Then it serves it (proxyed through itself) to the client. This means that as a client, you will never connect to Google/Youtube/Twitter - the Yotter server will do it for you. So if you want to set up a Yotter server for privacy reasons I recommend you to set it up on a remote VPS so you don't share your IP with, or use a VPN on the server.
If you don't mind exposing your IP making requests to Google then you can set it up wherever you want. Even with this method you will **avoid all trackers, ads, heavy-loaded pages, etc**. - you can still stay safe if you use a VPN to hide your IP.
#### Your data
The only things the database stores are:
* Salted hash of the password
* Username
* Email (we won't send you any mails so you can make up the mail) - This is for future versions.
* List of followed users
* List of saved posts
* Some user configurations
# Self hosting
This data will never be used for any other purpose than offering the service to the user. It's not sent anywhere, never.
### Local
You don't need a server to run Parasitter. You can run it on your computer locally and own your (little) data. The installation process is done on a GNU/Linux environment, but should be pretty similar on other platforms.
#### Security
Only the salted hash of your password is stored in the database, so no admin can see or guess your plain-text password ever. Also, no personal information of any kind is required nor kept, if a hacker gets access to the database the only thing they could do would be to follow/unfollow some accounts. So there's no motivation in 'hacking' Yotter.
1. Install `python3`, `pip3`, `python3-venv` (optional) and `git`.
2. Clone this repository:
- `git clone https://github.com/pluja/Parasitter.git`
3. Navigate to the project folder:
- `cd Parasitter`
4. [Optional] Prepare a virtual environment and activate it:
I always recommend self-hosting, as you will be the only person with access to your data.
> Python lets you create virtual environments. This allows you to avoid installing all the `pip` packages on your system.
If you don't mind about that, you can jump to step **5.** and ignore everything about "[env]".
- `python3 -m venv venv`
- `source venv/bin/activate`
> Now you are inside of the virtual environment for python. All instructions wiht [env] indicate that must be done inside the env if you decided to create one. From now on, you will always need to start the application from within the virtual env.
5. [env] Update pip
- `pip3 install --upgrade pip`
6. [env] Install the required libraries:
- `pip3 install -r requirements.txt`
> Use `sudo` or, preferably `--user`, if not working.
7. [env] Initialize and prepare the database.
- `flask db init`
- `flask db migrate`
- `flask db upgrade`
8. [env] Run the application.
- `flask run`
9. Go to "http://localhost:5000/" and enjoy.
> Important note: The **client** never connects to Google / Youtube however, the server does in order to gather all the necessary things!
### Updating to new versions:
**NOTE: Updating will never delete your database, your following list will not be erased.**
1. Navigate to the git repository (the one you cloned when installing).
2. Pull new changes:
- `git pull`
4. Install new packages (if any):
- `pip install -r requirements.txt`
> It may be that there are no new packages to install. In that case, all requirements will be satisfied.
# Public Instances
| Name |Server location|Status & Register|
| ------------ | ------------ | ------------ |
| https://yotter.xyz/ |Germany| [Go](https://yotter.xyz/status)|
| https://yotter.kavin.rocks/ |India| [Go](https://yotter.kavin.rocks/status)|
| https://yotter.jank.media/ |Germany| [Go](https://yotter.jank.media/status)|
5. [opt] This next step is only needed if you are running a version previous to [2020-07-15](CHANGELOG.md). Then you will need to update the database:
- `flask db migrate`
- `flask db upgrade`
6. Done! You are on latest version.
> **See [CHANGELOG](CHANGELOG.md) for a list of changes.**
# Contributing
Contributors are always welcome. You can help in many ways: Coding, organizing, designing, [donating](#donate), maintaining... You choose what you want to help with!
### Server
Another option is to host a Parasitter server so you can access it from anywhere or give access to your beloved friends/community. Installation is a little bit more complex than the [local](#local), but should be easy if you follow the steps.
We have a [Matrix](https://matrix.org/) room where we discuss anything related with Yotter, feel free to enter the room and start talking or reading. You can choose a Matrix client from [this list of Matrix clients](https://matrix.org/clients/). Also you will need to choose an instance to host your account, you can find Matrix instances [here](https://www.hello-matrix.net/public_servers.php).
> WARNING: This section is under construction.
##### Installing the app:
1. Install base dependencies:
- `sudo apt-get -y update`
- `sudo apt-get -y install python3 python3-venv python3-dev`
- `sudo apt-get -y install mysql-server postfix supervisor nginx git`
> Installation of MySQL will require you to enter a *database root* password.
2. Install the application:
- `git clone https://github.com/pluja/Parasitter.git`
- `cd Parasitter`
3. Prepare the environment:
- `python3 -m venv venv`
- `source venv/bin/activate`
- (venv) $ `pip install -r requirements.txt`
4. Install deployment packages:
- (venv) `pip install gunicorn pymysql`
5. Edit the *.env* SECRET_KEY:
- `nano .env`
> This will open an editor. Make sure to change the SECRET_KEY to a string of your like. Make it random and long enough.
6. Set up FLASK_APP environment variable:
- `echo "export FLASK_APP=parasitter.py" >> ~/.profile`
<a href="https://matrix.to/#/!wqJnbUtEfitxtOsLFj:privacytools.io?via=privacytools.io&via=matrix.org"><img alt="Join Matrix" src="https://img.shields.io/badge/Join Room-Matrix-black.svg">
##### Database configuration:
1. Enter the MySQL command prompt:
- `mysql -u root -p`
> It will prompt for the "root" password. This password is the one you set on the MySQL installation.
2. Create the database:
- mysql> `create database parasitter character set utf8 collate utf8_bin;`
- mysql> `create user 'parasitter'@'localhost' identified by '<db-password>';`
> Replace `<db-password>` as the password for the database *parasitter* user. This one needs to match the password set on the DATABASE_URL in the *.env* file (See Step 5 of [App installation](installing-the-app))
- mysql> `grant all privileges on parasitter.* to 'parasitter'@'localhost';`
- mysql> `flush privileges;`
- mysql> `quit;`
3. Upgrade the database:
- (venv) `flask db upgrade`
#### Other platforms:
<a href="https://reddit.com/r/Yotter"><img alt="Join Matrix" src="https://img.shields.io/badge/Reddit-r/Yotter-orange.svg">
#### TO BE CONTINUED!
# Powered by:
These are projects that either make Yotter possible as an **essential part** of it or that served as **inspiration for some parts** of the code.
### Powered by:
* [Nitter](https://nitter.net)
* [Invidious](https://invidio.us)
* [Nitter](https://nitter.net/)
* [Youtube-local](https://github.com/user234683/youtube-local)
* [youtube-dlc](https://github.com/blackjack4494/yt-dlc)
* [Flask](https://flask.palletsprojects.com/)
* [SQLAlchemy](https://docs.sqlalchemy.org/en/13/)
* [Semantic-UI](https://semantic-ui.com)
* [requests-futures](https://github.com/ross/requests-futures)
* [microblog](https://github.com/miguelgrinberg/microblog)
* [Video.js](https://videojs.com/)
* [Invidious](https://github.com/iv-org/invidious)
### Donate 💌
This project is completelly Open Source and is built on my own free time as a hobby. I am (almost) alone with it [one contributor helped me with a small thing but he's not an active contributor anymore].
# [Donate](https://github.com/pluja/pluja/blob/main/SUPPORT.md)
If you like it, you can buy me a coffee!
[Click here to see donation options](https://github.com/pluja/pluja/blob/main/SUPPORT.md)
- **Bitcoin**: `3EjaWjtsHz4WpbVL5Wx8Xg6MfyRRnKYj4e`
- **Monero**: `83hinYmUkMH2ANgdhxRupmakzLwN26ddePrLQvZv4E3Q1CWjq7MDzsKRcPqLPQwTvG3DdujyaxbKbMsf9VKVAmphMhsfndc`
This project is completely free and Open Source and will always be.
Donations are used to mantain the [yotter.xyz](https://yotter.xyz/) public instance. [This is the server](https://www.netcup.eu/bestellen/produkt.php?produkt=2598) that I have rented for now.
## Screenshots
#### Twitter / Tweets / Profiles
<p align="center"> <img width="720" src="https://i.imgur.com/tA15ciH.png"> </img></p>
<p align="center"> <img width="720" src="https://i.imgur.com/BYswFy6.png"> </img></p>
#### Twitter search
<p align="center"> <img width="720" src="https://i.imgur.com/KalBDa5.png"> </img></p>
#### Youtube feed
<p align="center"> <img width="720" src="https://i.imgur.com/rHsKl0e.png"> </img></p>
#### Youtube video page / Comments
<p align="center"> <img width="720" src="https://i.imgur.com/pQhLcvI.png"> </img></p>
<p align="center"> <img width="720" src="https://i.imgur.com/kZPGUdq.png"> </img></p>
#### Youtube channel page
<p align="center"> <img width="720" src="https://i.imgur.com/zybRB7X.png"> </img></p>
#### Youtube search
<p align="center"> <img width="720" src="https://i.imgur.com/XHCSNTP.png"> </img></p>
## Redirect
If you want to worry less and enjoy Yotter more, you can use any of the following extensions to redirect Youtube to Yotter automatically:
* [Youtter](https://addons.mozilla.org/en-US/firefox/addon/youtter/?utm_source=addons.mozilla.org&utm_medium=referral&utm_content=search) - Firefox
* [Privacy Redirect](https://addons.mozilla.org/en-US/firefox/addon/youtter/?utm_source=addons.mozilla.org&utm_medium=referral&utm_content=search) - Chromium
* Set Yotter as a Invidious instance on extension options.
* [HTTPSEverywhere](https://www.eff.org/https-everywhere) - Both
* You can set up redirects. Use a "http://youtube.com/ -> https://yotterinstance.xyz/" redirect.

377
SELF-HOSTING.md Normal file
View File

@ -0,0 +1,377 @@
<a href="https://github.com/pluja/Yotter"><img alt="Installation Working" src="https://img.shields.io/badge/Status-Working 2020.10.05-green.svg"></img></a>
<a href="https://github.com/pluja/Yotter"><img alt="Tested on Ubuntu" src="https://img.shields.io/badge/Tested On-Ubuntu Server 20.04LTS-blue.svg"></img></a>
# Why should I self host?
Self-hosting gives you the whole power over the service and the data. You can set up a server for your own personal use or share it with friends and family. Or, why not go further and share it with the whole world?
When you self-host you make internet stronger and more censorship resistant. If one Yotter instance goes down for any reason, there will be all other instances online and ready to host new users.
# Index
* [Pre-Installation](#pre-installation)
* [Installation](#installation)
* [Docker Installation](#docker)
* [Manual Installation](#manual-installation)
* [Configure the server](#configure-the-server)
* [Update](#updating-the-server)
* [Others](#other-configurations)
# First Steps
You will need a server of your own, it is recomended to rent a VPS server on any service you like. Minimum requirements for ~100 users are 2GB of RAM and a Linux Server. It is better if the server is dedicated as whole to Yotter as it will improve performance and security.
Everything that appears between `< >` needs to be changed by you. So for example if you see `<password>` you should change it for `yourPassword` without keeping the `< >`.
## Set up a user
First of all, you will need to set up a new user on the server. For security reasons you should **never** use a `root` user to set up a service. If you already have a non-root user you can use that one and skip the following steps.
We will create a user named `ubuntu` as I will be setting this up on an ubuntu machine. So, if you choose a different username make sure you replace it on future commands. We will create and login to the user as follows:
```
# adduser --gecos "" ubuntu
# usermod -aG sudo ubuntu
# su ubuntu
$ cd
```
If you now type `pwd` and hit enter, you shuould see that the current path is `/home/<user>/`
Now you should be logged in. Make sure to set up a good password. It is recommended to use ssh keys to log-in remotelly and disable the password login on all users.
# Installation
## Docker
### 1. Pre-Configuration
1. [Install docker](https://paste.ubuntu.com/p/KMDHqs3XvB/):
> Instructions for Ubuntu 20.04LTS. For any other systems there are plenty of guides on the internet.
2. [Install docker-compose](https://paste.ubuntu.com/p/pgqkPzCpJk/):
> General instructions for all Linux systems
3. You can check it was installed with `docker-compose --version`
4. Install nginx if not installed.
* `sudo apt install nginx`
### 2. Setting up Yotter
1. Run the following commands on your server:
```
git clone https://github.com/ytorg/Yotter && cd Yotter
docker-compose up -d
chown -R www-data:www-data /var/run/ytproxy
```
> You may need to use `sudo` for turning up the docker-compose
2. Configure nginx as a reverse proxy to your docker container:
* Create a new nginx configuration file:
- `sudo nano /etc/nginx/sites-enabled/yotter`
* Paste the content of [this file](https://paste.ubuntu.com/p/248hh6crWH/) to the config file.
- Change `<example.com>` by your domain.
* Generate a ssl certificate:
- Follow [Let's Encrypt](https://certbot.eff.org/lets-encrypt/ubuntufocal-nginx) guide **(Recommended)**
- Only steps `3`, `5`, `6` and `7a (first command only)` are needed.
* Reload nginx:
- `sudo service nginx reload`
3. You are now ready to use Yotter on your domain!
- **Note that you will need to set up your domain DNS to resolve to your server IP.**
##### Extra step:
- [Configure the server](#configure-the-server)
### How Update with Docker
```
$ docker-compose down
$ docker pull ytorg/yotter
$ docker-compose up -d
```
> `sudo` may be needed.
<hr>
## Manual installation
#### Step 1: Base setup
1. Connect to your server via SSH or direct access.
- `ssh ubuntu@<ipaddress>`
- [x] (Recommended) Set up password-less login with ssh-keys.
2. Install base dependencies:
* `sudo apt-get -y update`
* `sudo apt-get -y install python3 python3-venv python3-dev`
* `sudo apt-get -y install mysql-server supervisor nginx git`
> When installing MySQL-server it will prompt for a root password. This is the password for the root user of MySQL. Set up a password of your like, this will be the MySQL databases master password and will be required later, so don't forget it!
If after the MySQL-server installation you have not been prompted to create a password for the `root` user, run `sudo mysql_secure_installation`
3. Clone this repository and acccess folder:
* `git clone https://github.com/ytorg/Yotter`
* `cd Yotter`
4. Create a Python virtual environment and populate it with dependencies:
* `python3 -m venv venv`
* `source venv/bin/activate`
* `pip install wheel`
* `pip install cryptography`
* `pip install -r requirements.txt`
> You can edit the `yotter-config.json` file. [Check out all the options here](#configure-the-server)
5. Install gunicorn (production web server for Python apps) and pymysql:
`pip install gunicorn pymysql`
6. Set up the database tables:
* `flask db init`
* `flask db migrate`
* `flask db upgrade`
7. Set up `.env`
1. (PRE) Generate a **random string** and copy it to clipboard:
`python3 -c "import uuid; print(uuid.uuid4().hex)"`
2. Create a `.env` file on the root folder of the project (`/home/ubuntu/Yotter/.env`):
```
SECRET_KEY=<RandomString>
DATABASE_URL=mysql+pymysql://yotter:<db-password>@localhost:3306/yotter
```
Make sure you change `<RandomString>` for the previously generated random string. You can paste it as is, without any `"" or ''`. Also change `<db-password>`. `<db-password>` should be different from the password of the database root user (the one you set up on step 1.2). This password will be needed later.
#### Step 2: Setting up the MySQL Database:
* Open the MySQL prompt line (Use the previously set MySQL root password!)
`mysql -u root -p`
> Note that you are being prompted for the password of the MySQL root user, the one you set up on step 1.2, not the password you wrote on the `.env` file. The password on the `.env` is the password for the MySQL Yotter database.
> If you still have problems with the root user password try running `sudo mysql` and then run this query: `ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '<YOUR_PASSWORD>';`. This changes the password for the MySQL user `root` by `<YOUR_PASSWORD>`
Now you should be on the MySQL prompt line (`mysql>`). So let's create the databases:
> Change `<db-password>` for a password of your like. It will be the password for the dabase user `yotter`. Don't choose the same password as the root user of MySQL for security.
> The password `<db-password>` for the **yotter** user needs to match the password that you included in the `DATABASE_URL` variable in the `.env` file. If you want to change it, you can change it now.
```
mysql> create database yotter character set utf8 collate utf8_bin;
mysql> create user 'yotter'@'localhost' identified by '<db-password>';
mysql> grant all privileges on yotter.* to 'yotter'@'localhost';
mysql> flush privileges;
mysql> quit;
```
If your set up was correct, you should now be able to run:
* `flask db upgrade`
> If you get "No such command" error, run `source env/bin/activate` and try again.
#### Step 3: Setting up Gunicorn and Supervisor
When you run the server with flask run, you are using a web server that comes with Flask. This server is very useful during development, but it isn't a good choice to use for a production server because it wasn't built with performance and robustness in mind. Instead of the Flask development server, for this deployment I decided to use gunicorn, which is also a pure Python web server, but unlike Flask's, it is a robust production server that is used by a lot of people, while at the same time it is very easy to use. [ref](https://blog.miguelgrinberg.com/post/the-flask-mega-tutorial-part-xvii-deployment-on-linux)
* Start yotter under Gunicorn and check it has no errors:
`gunicorn -b localhost:8000 -w 4 yotter:app`
Once you see that no errors appear, you can stop gunicorn by pressing `Ctrl+C`.
The supervisor utility uses configuration files that tell it what programs to monitor and how to restart them when necessary. Configuration files must be stored in /etc/supervisor/conf.d. Here is a configuration file for Yotter, which I'm going to call yotter.conf [ref](https://blog.miguelgrinberg.com/post/the-flask-mega-tutorial-part-xvii-deployment-on-linux).
* Create a yotter.conf file on `/etc/supervisor/conf.d/`:
> You can run `sudo nano /etc/supervisor/conf.d/yotter.conf` and paste the text below:
> Make sure to fit any path and user to your system.
```
[program:yotter]
command=/home/ubuntu/Yotter/venv/bin/gunicorn -b localhost:8000 -w 4 yotter:app
directory=/home/ubuntu/Yotter
user=ubuntu
autostart=true
autorestart=true
stopasgroup=true
killasgroup=true
```
After you write this configuration file, you have to reload the supervisor service for it to be imported:
`sudo supervisorctl reload`
#### Step 4: Set up Nginx, http3 proxy and HTTPS
The Yotter application server powered by gunicorn is now running privately port 8000. Now we need to expose the application to the outside world by enabling public facing web server on ports 80 and 443, the two ports too need to be opened on the firewall to handle the web traffic of the application. I want this to be a secure deployment, so I'm going to configure port 80 to forward all traffic to port 443, which is going to be encrypted. [ref](https://blog.miguelgrinberg.com/post/the-flask-mega-tutorial-part-xvii-deployment-on-linux).
First we will get and set up the `http3-ytproxy`. For this we will need to [install go](https://github.com/golang/go/wiki/Ubuntu) but if you are on Ubuntu 20.04 or you have `snap` installed you can just run `sudo snap install --classic go` to get `go` installed.
Then you will need to run the following commands:
```
cd $HOME
git clone https://github.com/FireMasterK/http3-ytproxy
cd http3-ytproxy
go build -ldflags "-s -w" main.go
mv main http3-ytproxy
mkdir socket
chown -R www-data:www-data socket
```
Now we will configure a `systemd` service to run the http3-ytproxy. For this you will need to `sudo nano /lib/systemd/system/http3-ytproxy.service` to start a the `nano` text editor. Now copy and paste this and save:
> IMPORTANT: You may need to change some paths to fit your system!
```
[Unit]
Description=Sleep service
ConditionPathExists=/home/ubuntu/http3-ytproxy/http3-ytproxy
After=network.target
[Service]
Type=simple
User=www-data
Group=www-data
LimitNOFILE=1024
Restart=on-failure
RestartSec=10
WorkingDirectory=/home/ubuntu/http3-ytproxy
ExecStart=/home/ubuntu/http3-ytproxy/http3-ytproxy
# make sure log directory exists and owned by syslog
PermissionsStartOnly=true
ExecStartPre=/bin/mkdir -p /var/log/http3-ytproxy
ExecStartPre=/bin/chown syslog:adm /var/log/http3-ytproxy
ExecStartPre=/bin/chmod 755 /var/log/http3-ytproxy
StandardOutput=syslog
StandardError=syslog
SyslogIdentifier=http3-ytproxy
[Install]
WantedBy=multi-user.target
```
> IMPORTANT NOTE: Some distros have the Nginx user as `nginx` instead of `www-data`, if this is the case you should change the `User=` and `Group=` variables from the service file.
Now you are ready to enable and start the service:
```
sudo systemctl enable http3-ytproxy.service
sudo systemctl start http3-ytproxy.service
```
If you did everything ok you should see no errors when running `sudo journalctl -f -u http3-ytproxy`.
Now we will set up Nginx. To do so:
* `sudo rm /etc/nginx/sites-enabled/default`
Create a new Nginx site, you can run `sudo nano /etc/nginx/sites-enabled/yotter`
And write this on it:
```
server {
server_name <yourdomain>;
location / {
proxy_pass http://localhost:8000;
}
location /static {
# handle static files directly, without forwarding to the application
alias </path/to>/Yotter/app/static;
expires 30d;
}
location ~ (^/videoplayback$|/videoplayback/|/vi/|/a/|/ytc/) {
proxy_pass http://unix:/home/ubuntu/http3-ytproxy/socket/http-proxy.sock;
add_header Access-Control-Allow-Origin *;
sendfile on;
tcp_nopush on;
aio_write on;
aio threads=default;
directio 512;
proxy_http_version 1.1;
proxy_set_header Connection "";
}
}
```
> Note: You may need to change the proxy-pass line to fit your system. It should point to the socket created on the `http3-ytproxy/socket` folder.
Make sure to replace `<yourdomain>` by the domain you are willing to use for your instance (i.e example.com). You can now edit `yotter-config.json` and set `isInstance` to `true`.
You will also need to change the `</path/to>` after `alias` to fit your system. You have to point to the Yotter folder, in this set up it would be `/home/ubuntu` as it is the location where we cloned the Yotter app. This alias is created to handle static files directly, without forwarding to the application.
Once done, you can run `sudo service nginx reload`. If everything so far went OK, you can now set the `isInstance` to `true` on the `yotter-config.json` file.
Now you need to install an SSL certificate on your server so you can use HTTPS. If you are running Ubuntu 20LTS or already have `snap` installed, you can proceed as follows:
1. `sudo snap install --classic certbot`
> Note that you will have to create an 'A Record' on the DNS of your domain to point to the IP of your server for this next step. If you don't know how to do it, [this guide might help you](https://www.namecheap.com/support/knowledgebase/article.aspx/319/2237/how-can-i-set-up-an-a-address-record-for-my-domain) as on most services the procedure is similar.
Now we will run certbot and we need to tell that we run an nginx server. Here you will be prompted which domain you want to create and install the certificate for, select your domain:
2. `sudo certbot --nginx`
[Follow this instructions to install certbot and generate an ssl certificate so your server can use HTTPS](https://certbot.eff.org/lets-encrypt/ubuntufocal-nginx)
Finally, once this is done, you should edit the `yotter` nginx config and change the `listen 443 ssl;` line to `listen 443 ssl http2;`
#### Updating the server
Updating the server should always be pretty easy. These steps need to be run on the Yotter folder and with the python virtual env activated.
```
(venv) $ git pull
(venv) $ sudo supervisorctl stop yotter
(venv) $ flask db migrate
(venv) $ flask db upgrade
(venv) $ pip install -r requirements.txt
(venv) $ sudo supervisorctl start yotter
```
* **IMPORTANT**: Make sure you have all set up on `yotter-config.json` once you finish the update.
<hr>
## Configure the server
You will find in the root folder of the project a file named `yotter-config.json`. This is the global config file for the Yotter server.
Currently available config is:
* **serverName**: Name of the server. Format: `example.com`
* **nitterInstance**: Nitter instance that will be used when fetching Twitter content. Format must be `https://<NitterInstance.tld>/`
* **maxInstanceUsers**: Max users on the instance. When set to `0` it closes registrations.
* **serverLocation**: Location of the server.
* **restrictPublicUsage**: When set to `false` the instance allows non-registered users to use some routes (i.e /watch?v=..., /ytsearch, /channel...). See [this section](https://github.com/pluja/Yotter/blob/dev-indep/SELF-HOSTING.md#removing-log-in-restrictions)
* **isInstance**: If your installation is on a server using Nginx, it must be True. Only false if running on a local machine. [See this link]()
* **maintenance_mode**: Activates a message on the server warning users of maintenance mode.
* **show_admin_message**: Shows a message from the admin with title as `admin_message_title` and body as `admin_message`
* **admin_user**: Username of the admin user.
* **max_old_user_days**: Maximum days for a user to be inactive, otherwise will be deleted if admin uses the action.
* **donation_url**: Adds a link to a donation method for the instance.
## Other configurations
### Removing log-in restrictions
> (NOT TESTED - COULD CRASH THE APP) Note that some routes make usage of the `current_user` variable to look if the current user is following some user or not, if you remove the restriction for such routes the app will crash. This will be solved on future releases.
For the example, let's allow for anyone to watch a video on our instance. Even if they aren't registered users. First we need to find the route that we want to allow, you can do it by navigating to the page and taking a look at the URL. Anything after the first `/` is the app route. When we're watching a video, the route is `/watch?v=<videoId>`.
Now on the file `routes.py` we will search for the code that the server runs when we navigate to that route. You can use the Find function on your text editor and search for `/watch`. Now, you will see that right below the definition of the route, `@app.route('/watch')`, there is a `@login_required` line. If you delete that line, no restriction will now be applied to that route.
But you must know that videos and images are proxied through the instance. So we will need to allow another route. For video streaming, the route is `/stream` and for images it is `/img`. So you just need to delete the `login_required` from those two other routes.
You can now reload the server and you will see that, without logging in, you can now watch videos.
### Increasing the channel name max size on the database (Only installations older than 2020.09.20)
On older versions the character limit for a Youtube suscritpion was 30. This caused some problems with channels that had a longer string for the channel name. Since 2020.09.20 version, this problem was solved, but for older installation the problem persists even if you update to the latest github version.
To solve this, we will need to modify our database and set up new character limits. Don't worry, it's easy.
First you need to open the MySQL prompt. This can be done wiht `mysql -u root -p`. It will prompt you the **mysql database root user password**, note that it is NOT the *sudo* password. Once you're in the MySQL prompt (`mysql>`) you can execute these commands:
1. `connect yotter;` - This will connect you to the yotter database.
2. `ALTER TABLE channel MODIFY COLUMN channelName VARCHAR(100);` - This alters the field `channelName` from the table `channel` and sets its limit to `100` characters.
3. `quit;`

1
app/cache/.ignore vendored Normal file
View File

@ -0,0 +1 @@
dummy file for clone and pull.

View File

@ -1 +0,0 @@
{"twitter": [{"username": "aantonop"}, {"username": "Trezor"}, {"username": "aitor13023985"}, {"username": "guaridadelzorro"}, {"username": "elonmusk"}, {"username": "bitcoin"}, {"username": "monero"}, {"username": "xmroutreach"}, {"username": "Locha_io"}, {"username": "randybrito"}, {"username": "btcven"}, {"username": "Snowden"}, {"username": "_prestwich"}, {"username": "TradeOnFire"}, {"username": "fluffypony"}, {"username": "browseyourlife"}], "youtube": [{"channelId": "UCjr2bPAyPV7t35MvcgT3W8Q"}, {"channelId": "UCJWCJCWOxBYSi5DhCieLOLQ"}, {"channelId": "UCW3iqZr2cQFYKdO9Kpa97Yw"}, {"channelId": "UCLXo7UDZvByw2ixzpQCufnA"}, {"channelId": "UCR9sFzaG9Ia_kXJhfxtFMBA"}, {"channelId": "UCbdSYaPD-lr1kW27UJuk8Pw"}, {"channelId": "UCa3DVlGH2_QhvwuWlPa6MDQ"}, {"channelId": "UComoqWnjQlH7JpvqfyGnWNA"}, {"channelId": "UCA58hhLv4pdgDjBW5oNSklA"}, {"channelId": "UCkHR9m-tscD3ojD7_viIfTA"}, {"channelId": "UCYO_jab_esuFRV4b17AJtAw"}, {"channelId": "UC9-y-6csu5WGm29I7JiwpnA"}, {"channelId": "UC2PA-AKmVpU6NKCGtZq_rKQ"}, {"channelId": "UC2Qc22WUjL_GbBDIPvmHWmQ"}, {"channelId": "UC3Hx81QYLoEQkm3vyl4N4eQ"}, {"channelId": "UCiwy9Lx6h1Oi-UYwYDbgBZA"}, {"channelId": "UCHW_zn-nX5nvMjEA6mtNZ1A"}, {"channelId": "UCy5znSnfMsDwaLlROnZ7Qbg"}, {"channelId": "UCJQQVLyM6wtPleV4wFBK06g"}, {"channelId": "UCyoAJbq6rqi9bgMB0uDQSFg"}, {"channelId": "UCsXVk37bltHxD1rDPwtNM8Q"}]}

BIN
app/favicon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

View File

@ -1,27 +1,27 @@
from flask_wtf import FlaskForm
from wtforms import StringField, PasswordField, BooleanField, SubmitField
from wtforms.validators import ValidationError, DataRequired, Email, EqualTo
from wtforms.validators import ValidationError, DataRequired, EqualTo
from app.models import User
class LoginForm(FlaskForm):
style={'class': 'ui primary button'}
username = StringField('Username', validators=[DataRequired()])
password = PasswordField('Password', validators=[DataRequired()])
remember_me = BooleanField('Remember Me')
submit = SubmitField('Sign In')
submit = SubmitField('Sign In', render_kw=style)
class SearchForm(FlaskForm):
username = StringField('Username')
submit = SubmitField('Search')
class ChannelForm(FlaskForm):
channelId = StringField('')
search = StringField('')
submit = SubmitField('Search')
class RegistrationForm(FlaskForm):
username = StringField('Username', validators=[DataRequired()])
email = StringField('Email', validators=[DataRequired(), Email()])
password = PasswordField('Password', validators=[DataRequired()])
password2 = PasswordField(
'Repeat Password', validators=[DataRequired(), EqualTo('password')])
@ -32,10 +32,5 @@ class RegistrationForm(FlaskForm):
if user is not None:
raise ValidationError('Please use a different username.')
def validate_email(self, email):
user = User.query.filter_by(email=email.data).first()
if user is not None:
raise ValidationError('Please use a different email address.')
class EmptyForm(FlaskForm):
submit = SubmitField('Submit')

View File

@ -9,19 +9,31 @@ followers = db.Table('followers',
)
channel_association = db.Table('channel_association',
db.Column('channel_id', db.String, db.ForeignKey('channel.id')),
db.Column('channel_id', db.Integer, db.ForeignKey('channel.id')),
db.Column('user_id', db.Integer, db.ForeignKey('user.id'))
) # Association: CHANNEL --followed by--> [USERS]
twitter_association = db.Table('twitter_association',
db.Column('account_id', db.Integer, db.ForeignKey('twitterAccount.id')),
db.Column('user_id', db.Integer, db.ForeignKey('user.id'))
) # Association: ACCOUNT --followed by--> [USERS]
class User(UserMixin, db.Model):
id = db.Column(db.Integer, primary_key=True)
username = db.Column(db.String(64), index=True, unique=True)
email = db.Column(db.String(120), index=True, unique=True)
password_hash = db.Column(db.String(128))
last_seen = db.Column(db.DateTime, default=datetime.utcnow())
is_admin = db.Column(db.Boolean, default=False, nullable=True)
posts = db.relationship('Post', backref='author', lazy='dynamic')
def __repr__(self):
return '<User {}>'.format(self.username)
return f'<User {self.username}>'
def set_last_seen(self):
self.last_seen = datetime.utcnow()
def set_admin_user(self):
self.is_admin = True
def set_password(self, password):
self.password_hash = generate_password_hash(password)
@ -29,7 +41,6 @@ class User(UserMixin, db.Model):
def check_password(self, password):
return check_password_hash(self.password_hash, password)
# TWITTER
def follow(self, user):
if not self.is_following(user):
self.followed.append(user)
@ -48,12 +59,27 @@ class User(UserMixin, db.Model):
def saved_posts(self):
return Post.query.filter_by(user_id=self.id)
# TWITTER
def twitter_following_list(self):
return self.twitterFollowed.all()
def is_following_tw(self, uname):
temp_cid = twitterFollow.query.filter_by(username = uname).first()
if temp_cid is None:
return False
else:
following = self.twitter_following_list()
for f in following:
if f.username == uname:
return True
return False
# YOUTUBE
def youtube_following_list(self):
return self.youtubeFollowed.all()
def is_following_yt(self, cid):
temp_cid = invidiousFollow.query.filter_by(channelId = cid).first()
temp_cid = youtubeFollow.query.filter_by(channelId = cid).first()
if temp_cid is None:
return False
else:
@ -69,11 +95,16 @@ class User(UserMixin, db.Model):
secondaryjoin=(followers.c.followed_id == id),
backref=db.backref('followers', lazy='dynamic'), lazy='dynamic')
youtubeFollowed = db.relationship("invidiousFollow",
youtubeFollowed = db.relationship("youtubeFollow",
secondary=channel_association,
back_populates="followers",
lazy='dynamic')
twitterFollowed = db.relationship("twitterFollow",
secondary=twitter_association,
back_populates="followers",
lazy='dynamic')
@login.user_loader
def load_user(id):
@ -88,14 +119,21 @@ class twitterPost():
isRT = True
urlToPost = ""
validPost = True
content = "El gato siguió a la liebre. Esto es un texto de ejemplo."
content = ""
profilePic = "url"
timeStamp = "error"
userProfilePic = "1.png"
isReply = False
replyingUrl = "#"
replyingUser = "@nobody"
replyingTweetContent = ""
attachedImg = ""
replyAttachedImg = ""
class invidiousPost():
class ytPost():
channelName = 'Error'
channelUrl = '#'
channelId = '@'
videoUrl = '#'
videoTitle = '#'
videoThumb = '#'
@ -105,24 +143,36 @@ class invidiousPost():
id = 'isod'
class invidiousFollow(db.Model):
class youtubeFollow(db.Model):
__tablename__ = 'channel'
id = db.Column(db.Integer, primary_key=True)
channelId = db.Column(db.String(30), nullable=False, unique=True)
channelId = db.Column(db.String(30), nullable=False)
channelName = db.Column(db.String(100))
followers = db.relationship('User',
secondary=channel_association,
back_populates="youtubeFollowed")
def __repr__(self):
return '<invidiousFollow {}>'.format(self.channelId)
return f'<youtubeFollow {self.channelName}>'
class twitterFollow(db.Model):
__tablename__ = 'twitterAccount'
id = db.Column(db.Integer, primary_key=True)
username = db.Column(db.String(100), nullable=False)
followers = db.relationship('User',
secondary=twitter_association,
back_populates="twitterFollowed")
def __repr__(self):
return f'<twitterFollow {self.username}>'
class Post(db.Model):
id = db.Column(db.Integer, primary_key=True)
body = db.Column(db.String(140))
body = db.Column(db.String(540))
timestamp = db.Column(db.String(100))
url = db.Column(db.String(100), unique=True)
username = db.Column(db.String(24))
url = db.Column(db.String(550), unique=True)
username = db.Column(db.String(100))
user_id = db.Column(db.Integer, db.ForeignKey('user.id'))
def __repr__(self):
return '<Post {}>'.format(self.body)
return f'<Post {self.body}>'

File diff suppressed because it is too large Load Diff

BIN
app/static/favicon_io.zip Normal file

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 68 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 746 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

View File

@ -0,0 +1 @@
{"name":"","short_name":"","icons":[{"src":"/android-chrome-192x192.png","sizes":"192x192","type":"image/png"},{"src":"/android-chrome-512x512.png","sizes":"512x512","type":"image/png"}],"theme_color":"#ffffff","background_color":"#ffffff","display":"standalone"}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 42 KiB

After

Width:  |  Height:  |  Size: 72 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 64 KiB

After

Width:  |  Height:  |  Size: 57 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 45 KiB

After

Width:  |  Height:  |  Size: 60 KiB

BIN
app/static/img/banner.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 42 KiB

BIN
app/static/img/close.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

BIN
app/static/img/closed.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 90 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 23 KiB

After

Width:  |  Height:  |  Size: 49 KiB

BIN
app/static/img/live.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 64 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.0 KiB

After

Width:  |  Height:  |  Size: 59 KiB

BIN
app/static/img/logo_new.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 58 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 39 KiB

BIN
app/static/img/open.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

View File

@ -0,0 +1 @@
.vjs-quality-selector .vjs-menu-button{margin:0;padding:0;height:100%;width:100%}.vjs-quality-selector .vjs-icon-placeholder{font-family:'VideoJS';font-weight:normal;font-style:normal}.vjs-quality-selector .vjs-icon-placeholder:before{content:'\f110'}.vjs-quality-changing .vjs-big-play-button{display:none}.vjs-quality-changing .vjs-control-bar{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;visibility:visible;opacity:1}

View File

@ -1,22 +0,0 @@
The MIT License (MIT)
Copyright (c) 2015 Semantic Org
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

View File

@ -1,7 +0,0 @@
# CSS Distribution
This repository is automatically synced with the main [Semantic UI](https://github.com/Semantic-Org/Semantic-UI) repository to provide lightweight CSS only version of Semantic UI.
This package **does not support theming** and includes generated CSS files of the default theme only.
You can view more on Semantic UI at [LearnSemantic.com](http://www.learnsemantic.com) and [Semantic-UI.com](http://www.semantic-ui.com)

View File

@ -1,20 +0,0 @@
{
"name": "semantic-ui-css",
"version": "2.4.1",
"title": "Semantic UI",
"description": "CSS Only distribution of Semantic UI",
"homepage": "http://www.semantic-ui.com",
"author": "Jack Lukic <jack@semantic-ui.com>",
"license": "MIT",
"main": "semantic.js",
"repository": {
"type": "git",
"url": "git://github.com/Semantic-Org/Semantic-UI-CSS.git"
},
"bugs": {
"url": "https://github.com/Semantic-Org/Semantic-UI/issues"
},
"dependencies": {
"jquery": "x.*"
}
}

67
app/static/styles.css Normal file
View File

@ -0,0 +1,67 @@
.video-js-responsive-container.vjs-hd {
padding-top: 56.25%;
}
.video-js-responsive-container.vjs-sd {
padding-top: 75%;
}
.video-js-responsive-container {
width: 100%;
position: relative;
}
.video-js-responsive-container .video-js {
height: 100% !important;
width: 100% !important;
position: absolute;
top: 0;
left: 0;
}
.para-light-grey{
background-color: rgb(250, 82, 82);
}
.para-green{
background-color: lightgreen;
}
.twitter{
color: rgb(0, 166, 196) !important;
}
.youtube{
color: rgb(224, 32, 32) !important;
}
.video-title{
font-weight: bold;
font-size: 1.15em;
}
.break-word{
word-break: break-word;
}
.overflow-auto{
overflow: auto;
}
.menu{
width: 100% !important;
}
.control-me {
visibility: hidden;
cursor: not-allowed;
}
#toggle:checked ~ .control-me {
visibility: visible;
cursor: pointer;
}
.scroller {
position: fixed;
right: 80px;
bottom: 30px;
}

1
app/static/video-js.min.css vendored Normal file

File diff suppressed because one or more lines are too long

27
app/static/video.min.js vendored Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

3
app/static/videojs.hotkeys.min.js vendored Normal file
View File

@ -0,0 +1,3 @@
/* videojs-hotkeys v0.2.27 - https://github.com/ctd1500/videojs-hotkeys */
!function(e,t){"undefined"!=typeof window&&window.videojs?t(window.videojs):"function"==typeof define&&define.amd?define("videojs-hotkeys",["video.js"],function(e){return t(e.default||e)}):"undefined"!=typeof module&&module.exports&&(module.exports=t(require("video.js")))}(0,function(e){"use strict";"undefined"!=typeof window&&(window.videojs_hotkeys={version:"0.2.27"});(e.registerPlugin||e.plugin)("hotkeys",function(t){function n(e){return"function"==typeof s?s(e):s}function o(e){null!=e&&"function"==typeof e.then&&e.then(null,function(e){})}var r=this,u=r.el(),l=document,i={volumeStep:.1,seekStep:5,enableMute:!0,enableVolumeScroll:!0,enableHoverScroll:!1,enableFullscreen:!0,enableNumbers:!0,enableJogStyle:!1,alwaysCaptureHotkeys:!1,captureDocumentHotkeys:!1,documentHotkeysFocusElementFilter:function(){return!1},enableModifiersForNumbers:!0,enableInactiveFocus:!0,skipInitialFocus:!1,playPauseKey:function(e){return 32===e.which||179===e.which},rewindKey:function(e){return 37===e.which||177===e.which},forwardKey:function(e){return 39===e.which||176===e.which},volumeUpKey:function(e){return 38===e.which},volumeDownKey:function(e){return 40===e.which},muteKey:function(e){return 77===e.which},fullscreenKey:function(e){return 70===e.which},customKeys:{}},c=e.mergeOptions||e.util.mergeOptions,a=(t=c(i,t||{})).volumeStep,s=t.seekStep,m=t.enableMute,y=t.enableVolumeScroll,f=t.enableHoverScroll,v=t.enableFullscreen,d=t.enableNumbers,p=t.enableJogStyle,b=t.alwaysCaptureHotkeys,h=t.captureDocumentHotkeys,w=t.documentHotkeysFocusElementFilter,k=t.enableModifiersForNumbers,S=t.enableInactiveFocus,K=t.skipInitialFocus,F=e.VERSION;u.hasAttribute("tabIndex")||u.setAttribute("tabIndex","-1"),u.style.outline="none",!b&&r.autoplay()||K||r.one("play",function(){u.focus()}),S&&r.on("userinactive",function(){var e=function(){clearTimeout(t)},t=setTimeout(function(){r.off("useractive",e);var t=l.activeElement,n=u.querySelector(".vjs-control-bar");t&&t.parentElement==n&&u.focus()},10);r.one("useractive",e)}),r.on("play",function(){var e=u.querySelector(".iframeblocker");e&&""===e.style.display&&(e.style.display="block",e.style.bottom="39px")});var q=function(e){var i,c,s=e.which,y=e.preventDefault.bind(e),f=r.duration();if(r.controls()){var S=l.activeElement;if(b||h&&w(S)||S==u||S==u.querySelector(".vjs-tech")||S==u.querySelector(".vjs-control-bar")||S==u.querySelector(".iframeblocker"))switch(g(e,r)){case 1:y(),(b||h)&&e.stopPropagation(),r.paused()?o(r.play()):r.pause();break;case 2:i=!r.paused(),y(),i&&r.pause(),(c=r.currentTime()-n(e))<=0&&(c=0),r.currentTime(c),i&&o(r.play());break;case 3:i=!r.paused(),y(),i&&r.pause(),(c=r.currentTime()+n(e))>=f&&(c=i?f-.001:f),r.currentTime(c),i&&o(r.play());break;case 5:y(),p?(c=r.currentTime()-1,r.currentTime()<=1&&(c=0),r.currentTime(c)):r.volume(r.volume()-a);break;case 4:y(),p?((c=r.currentTime()+1)>=f&&(c=f),r.currentTime(c)):r.volume(r.volume()+a);break;case 6:m&&r.muted(!r.muted());break;case 7:v&&(r.isFullscreen()?r.exitFullscreen():r.requestFullscreen());break;default:if((s>47&&s<59||s>95&&s<106)&&(k||!(e.metaKey||e.ctrlKey||e.altKey))&&d){var K=48;s>95&&(K=96);var F=s-K;y(),r.currentTime(r.duration()*F*.1)}for(var q in t.customKeys){var j=t.customKeys[q];j&&j.key&&j.handler&&j.key(e)&&(y(),j.handler(r,t,e))}}}},j=!1,T=u.querySelector(".vjs-volume-menu-button")||u.querySelector(".vjs-volume-panel");null!=T&&(T.onmouseover=function(){j=!0},T.onmouseout=function(){j=!1});var E=function(e){if(f)t=0;else var t=l.activeElement;if(r.controls()&&(b||t==u||t==u.querySelector(".vjs-tech")||t==u.querySelector(".iframeblocker")||t==u.querySelector(".vjs-control-bar")||j)&&y){e=window.event||e;var n=Math.max(-1,Math.min(1,e.wheelDelta||-e.detail));e.preventDefault(),1==n?r.volume(r.volume()+a):-1==n&&r.volume(r.volume()-a)}},g=function(e,n){return t.playPauseKey(e,n)?1:t.rewindKey(e,n)?2:t.forwardKey(e,n)?3:t.volumeUpKey(e,n)?4:t.volumeDownKey(e,n)?5:t.muteKey(e,n)?6:t.fullscreenKey(e,n)?7:void 0};return r.on("keydown",q),r.on("dblclick",function(e){if(null!=F&&F<="7.1.0"&&r.controls()){var t=e.relatedTarget||e.toElement||l.activeElement;t!=u&&t!=u.querySelector(".vjs-tech")&&t!=u.querySelector(".iframeblocker")||v&&(r.isFullscreen()?r.exitFullscreen():r.requestFullscreen())}}),r.on("mousewheel",E),r.on("DOMMouseScroll",E),h&&document.addEventListener("keydown",function(e){q(e)}),this})});
//# sourceMappingURL=videojs.hotkeys.min.js.map

View File

@ -2,7 +2,7 @@
{% block content %}
<div style="margin-top: 2em;" class="ui one column centered grid">
<img class="ui medium circular image" src="{{ url_for('static',filename='img/404.png') }}">
<img alt="Error 404 Image" class="ui medium circular image" src="{{ url_for('static',filename='img/404.png') }}">
</div>
<div style="margin: 1.5em;" class="ui one column centered grid">
<h2 class="ui header">This page is not on the map.</h2>

View File

@ -2,7 +2,7 @@
{% block content %}
<div style="margin-top: 2em;" class="ui one column centered grid">
<img class="ui medium circular image" src="{{ url_for('static',filename='img/405.png') }}">
<img alt="Error 405 Image" class="ui medium circular image" src="{{ url_for('static',filename='img/405.png') }}">
</div>
<div style="margin: 1.5em;" class="ui one column centered grid">
<h2 class="ui header">You are not allowed to do this!</h2>

View File

@ -2,7 +2,7 @@
{% block content %}
<div style="margin-top: 2em;" class="ui one column centered grid">
<img class="ui medium circular image" src="{{ url_for('static',filename='img/500.png') }}">
<img alt="Error 500 Image" class="ui medium circular image" src="{{ url_for('static',filename='img/500.png') }}">
</div>
<div style="margin: 1.5em;" class="ui one column centered grid">
<h2 class="ui header">Something went wrong... But it's not your fault!</h2>

View File

@ -0,0 +1,10 @@
<div class="ui center aligned text container">
<div class="ui row">
<img alt="Closed registrations image" class="ui centered medium image" src="{{ url_for('static',filename='img/closed.png') }}">
</div>
<div class="ui row">
<h2 class="ui header">Registrations are currently closed.</h2>
<h5 class="ui centered header"><a href="https://github.com/ytorg/Yotter#why-do-i-have-to-register-to-use-yotter">Why do I have to register?</a></h5>
</div>
</div>

View File

@ -1,9 +1,9 @@
<div style="margin-top: 2em;" class="ui one column centered grid">
<div style="margin: 1.5em;" class="ui row">
<img class="ui medium circular image" src="{{ url_for('static',filename='img/empty.png') }}">
<div class="ui center aligned text container">
<div class="ui row">
<img alt="Empty feed image" class="ui image" src="{{ url_for('static',filename='img/empty.png') }}">
</div>
<div style="margin: 1.5em;" class="ui row">
<div class="ui row">
<h2 class="ui header">This feed is empty.</h2>
</div>
</div>

View File

@ -1,37 +0,0 @@
<div class="column"> <!--Start tweet-->
<div class="ui centered card">
<div class="content">
<div class="extra content">
<div class="left floated author">
<img class="ui avatar image" src="{{ url_for('static',filename='img/avatars/')}}{{range(1, 12) | random}}.png">
</div>
<a href="{{post.url}}"><span class="right floated star">
<i class="share square outline icon"></i>
</span></a>
</div>
<div class="header" id="author"><a href="user/{{post.op.replace('@','')}}">{{ post.op }}</a></div>
<div class="meta">
<span class="category" id="time"><i class="clock icon"></i> {{post.date}} </span>
<span class="category"><i class="retweet icon"></i> {{post.username}} retwitted</span>
</div>
<div class="description">
<p>{{post.content}}</p>
</div>
<div class="extra content">
<p>
<form class="ui form" action="{{ url_for('savePost', url=post.url.replace('/', '~')) }}" method="post">
<button type="submit" class="ui icon button">
<i class="bookmark outline icon"></i>
</button>
</form>
</p>
</div>
</div>
<!--<div class="extra content">
<i class="like icon"></i> 1000
<span> · · </span>
<i class="retweet icon"></i> 20
</div>-->
</div>
</div> <!--End tweet-->

View File

@ -1,37 +0,0 @@
<div class="column"> <!--Start tweet-->
<div class="ui centered card">
<div class="content">
<div class="extra content">
<div class="left floated author">
<img class="ui avatar image" src="{{ post.profilePic }}">
</div>
<a href="{{post.url}}"><span class="right floated star">
<i class="share square outline icon"></i>
</span></a>
</div>
<div class="header" id="author"><a href="user/{{post.op.replace('@','')}}">{{ post.op }}</a></div>
<div class="meta">
<span class="category" id="time"><i class="clock icon"></i> {{post.date}} </span>
{% if post.isPinned %}
<span class="category" id="time"><i class="map pin icon"></i> Pinned </span>
{%endif%}
</div>
<div class="description">
<p>{{post.content}}</p>
</div>
<div class="extra content">
<form class="ui form" action="{{ url_for('savePost', url=post.url.replace('/', '~')) }}" method="post">
<button type="submit" class="ui icon button">
<i class="bookmark outline icon"></i>
</button>
</form>
</div>
</div>
<!--<div class="extra content">
<i class="like icon"></i> 1000
<span> · · </span>
<i class="retweet icon"></i> 20
</div>-->
</div>
</div> <!--End tweet-->

View File

@ -3,7 +3,7 @@
<div class="content">
<div class="extra content">
<div class="left floated author">
<img class="ui avatar image" src="{{ url_for('static',filename='img/avatars/')}}{{range(1, 12) | random}}.png">
<img alt="Avatar random" class="ui avatar image" src="{{ url_for('static',filename='img/avatars/')}}{{range(1, 12) | random}}.png">
</div>
<a href="{{post.url}}"><span class="right floated star">

View File

@ -0,0 +1,85 @@
<div class="ui centered card"><!--Start tweet-->
<div class="content">
<div class="extra content">
<div class="left floated author">
<img alt="Avatar" class="ui avatar image" src="{{ post.profilePic }}">
</div>
<a target="_blank" href="{{post.url}}"><span class="right floated star">
<i class="share square outline icon"></i>
</span></a>
</div>
<div class="header" id="author"><a href="{{url_for('u', username=post.op.replace('@',''))}}">{{ post.op }}</a></div>
<div class="meta">
<span class="category" id="time"><i class="clock icon"></i> {{post.date}} </span>
{% if post.isPinned %}
<span class="category" id="time"><i class="map pin icon"></i> Pinned </span>
{%endif%}
{% if post.isRT %}
<span class="category"><i class="retweet icon"></i> {{post.username}}</span>
{%endif%}
</div>
<div style="margin-bottom: 15px;" class="description break-word">
<p>{{post.content | safe}}</p>
</div>
<div class="content">
{% if post.attachedImages %}
{%for img in post.attachedImages %}
<a target="_blank" href="{{img}}">
<img alt="Image attachment" class="ui centered fluid rounded medium image" src="{{img}}">
</a>
{%endfor%}
{% endif %}
{% if post.attachedVideo %}
<div class="ui segment"><p><i class="file video icon"></i> <b>This tweet has an attached video.</b></p></div>
{%endif%}
{% if post.isReply %}
{%if post.unavailableReply%}
<div class="ui card">
<div class="content">
<p> This tweet is unavailable. </p>
</div>
</div>
{%else%}
<div class="ui card">
<div class="content">
<div class="header"><a href="/{{post.replyingUser}}">{{post.replyingUser}}</a></div>
<div class="meta">{{post.replyingUser}}</div>
<div class="description break-word">
{{post.replyingTweetContent | safe}}
{% if post.replyAttachedImg %}
<a target="_blank" href="{{post.replyAttachedImg}}">
<img alt="Image attachment" class="ui centered fluid rounded medium image" src="{{post.replyAttachedImg}}">
</a>
{% endif %}
</div>
</div>
</div>
{%endif%}
{% endif %}
<p>
<form class="ui form" action="{{ url_for('savePost', url=post.url.replace('/', '~')) }}" method="post">
<button type="submit" class="mini ui icon button">
<i class="bookmark outline icon"></i>
</button>
</form>
</p>
</div>
</div>
<div class="extra content">
<span class="left floated">
<i class="red heart like icon"></i>
{{post.likes}}
<span> </span>
<i class="grey comment icon"></i>
{{post.comments}}
</span>
<span class="right floated">
<i class="blue retweet icon"></i>
{{post.retweets}}
<i class="grey quote left icon"></i>
{{post.quotes}}
</span>
</div>
</div> <!--End tweet-->

View File

@ -0,0 +1,27 @@
<div class="comment">
<a class="avatar" style="width: 32px; height: 32px;"><img src="{{ comment.thumbnail }}"></a>
<div class="content">
{% if comment.author == info.author %}
<a class="author" style="color: red;" href="{{comment.channel}}"><i class="red user circle icon"></i>{{comment.author}}</a>
{% else %}
<a class="author" href="{{comment.channel}}">{{comment.author}}</a>
{% endif %}
<div class="metadata">
<div class="date">{{comment.date}}</div>
</div>
<div class="text">
{{comment.text}}
</div>
<div class="metadata">
<div class="rating">
<i class="comment icon"></i>
{{comment.replies}}
</div>
<div class="rating">
<i class="thumbs up icon"></i>
{{comment.likes}}
</div>
</div>
</div>
</div>

View File

@ -1,30 +1,38 @@
<div class="card">
<div class="image">
<img src="{{video.videoThumb}}">
</div>
<div class="content">
<a class="video-title" href="{{url_for('video', id=video.id)}}">{{video.videoTitle}}</a>
<div class="meta">
<a href="{{video.channelUrl}}">{{video.channelName}}</a>
</div>
<div class="description">
{{video.description}}
</div>
<div class="ui card">
<a class="image" href="{{url_for('watch', v=video.id, _method='GET')}}">
<img src="{{video.videoThumb}}">
</a>
<div class="content">
<a class="header" href="{{url_for('watch', v=video.id, _method='GET')}}">{{video.videoTitle}}</a>
<div class="meta">
<a class="break-word" href="{{url_for('channel', id=video.channelId)}}">{{video.channelName}}</a>
</div>
</div>
<div class="extra content">
<span class="right floated">
<i class="eye icon"></i>
{{video.views}}
</span>
<span class="right floated">
<i class="clock icon"></i>
{{video.timeStamp}}
</span>
{% if video.isLive == "Livestream" or video.isLive %}
<span class="left floated like">
<i class="red circle icon"></i>
{{video.views}}
</span>
{% else %}
<span class="left floated like">
<i class="eye icon"></i>
{{video.views}}
</span>
{% endif %}
{% if video.timeStamp == "Scheduled" or video.isUpcoming %}
<span class="right floated star">
<i class="blue clock icon"></i>
{{video.timeStamp}}
</span>
{% else %}
<span class="right floated star">
<i class="clock icon"></i>
{{video.timeStamp}}
</span>
{% endif %}
<span>
<a href="{{video.videoUrl}}">
<i class="share square outline icon"></i>
Open
</a>
</span>
</div>
</div>

View File

@ -2,66 +2,64 @@
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
{% if title %}
<title>{{ title }} - Parassiter</title>
<title>{{ title }} - Yotter</title>
{% else %}
<title>Parasitter</title>
<title>Yotter</title>
{% endif %}
<link rel= "stylesheet" type= "text/css" href= "{{ url_for('static',filename='semantic/semantic.min.css') }}">
<meta name="viewport" content="width=device-width">
<link rel="preload" as= "style" type= "text/css" href= "{{ url_for('static',filename='semantic/semantic.min.css') }}">
<link rel="stylesheet" type= "text/css" href="{{ url_for('static',filename='styles.css') }}">
<link rel="icon" href="{{ url_for('static',filename='favicons/favicon.ico') }}">
<style>
.twitter{
color: rgb(0, 166, 196) !important;
}
.youtube{
color: rgb(224, 32, 32) !important;
}
.video-title{
font-weight: bold;
font-size: 1.15em;
}
</style>
<link rel="stylesheet"href= "{{ url_for('static',filename='semantic/semantic.min.css') }}">
</head>
<body>
<div class="ui stackable menu">
<div class="item">
<img src="{{ url_for('static',filename='img/logo.png') }}">
{% if config.maintenance_mode %}
<div class="ui info message">
<div class="header">
Server under maintenance.
</div>
</div>
<a href="{{ url_for('index') }}" class="twitter item">Twitter</a>
{% endif %}
<div class="ui icon menu overflow-auto">
<a href="{{ url_for('index') }}"><div class="item">
<img alt="Yotter simple logo" src="{{ url_for('static',filename='img/logo_simple.png') }}">
</div></a>
{% if current_user.is_anonymous %}
<a href="{{ url_for('login') }}" class="item">Login</a>
{% else %}
<a href="{{ url_for('search') }}" class="twitter item">Search</a>
<a href="{{ url_for('following') }}" class="twitter item">Following</a>
<a href="{{ url_for('saved') }}" class="twitter item">Saved</a>
<a href="{{ url_for('invidious') }}" class="youtube item">Youtube</a>
<a href="{{ url_for('ytsearch') }}" class="youtube item">Search</a>
<a href="{{ url_for('logout') }}" class="item">Logout</a>
<a href="{{ url_for('settings') }}" class="item"><i class="cog icon"></i></a>
<a href="{{ url_for('twitter') }}" class="twitter item"><i class="twitter icon"></i></a>
<a href="{{ url_for('search') }}" class="twitter item"><i class="search icon"></i></a>
<a href="{{ url_for('saved') }}" class="twitter item"><i class="bookmark icon"></i></a>
<a href="{{ url_for('youtube') }}" class="youtube item"><i class="youtube icon"></i></a>
<a href="{{ url_for('ytsearch') }}" class="youtube item"><i class="search icon"></i></a>
<div class="right menu">
<a href="{{ url_for('settings') }}" class="item"><i class="cog icon"></i></a>
<a href="{{ url_for('logout') }}" class="item"><i class="sign-out icon"></i></a>
</div>
{% endif %}
</div>
{% with messages = get_flashed_messages() %}
{% if messages %}
<div class="ui info message">
<div class="header">
Information
<div class="text centered container ui">
<div class="ui info message">
<div class="header">
Information
</div>
<ul class="list">
{% for message in messages %}
<li>{{ message }}</li>
{% endfor %}
</ul>
</div>
<ul class="list">
{% for message in messages %}
<li>{{ message }}</li>
{% endfor %}
</ul>
</div>
</ul>
{% endif %}
{% endwith %}
{% block content %}{% endblock %}
<script src="https://code.jquery.com/jquery-3.1.1.min.js" integrity="sha256-hVVnYaiADRTO2PzUGmuLJr8BLUSjGIZsDYGmIJLv2b8=" crossorigin="anonymous"></script>
</body>
</html>

View File

@ -0,0 +1,96 @@
{% extends "base.html" %}
{% block content %}
<div class="ui center aligned text container">
<div class="ui centered vertical segment">
<h2 class="ui header">
<img src="{{data.avatar}}" class="ui circular image">
{{data.channel_name}}
</h2>
</div>
{% if data.short_description %}
<div class="ui vertical segment">
<p>{{data.short_description}}</p>
</div>
{%endif%}
<div class="ui vertical segment">
<!--<div class="ui tiny statistic">
<div class="value">
{%if data.approx_suscriber_count == None%}
<i class="user icon"></i> ?
{%else%}
<i class="user icon"></i> {{data.approx_subscriber_count}}
{%endif%}
</div>
<div class="label">
Followers
</div>
</div>-->
{% if restricted or current_user.is_authenticated %}
{% if not current_user.is_following_yt(data.channel_id) %}
<form action="{{ url_for('ytfollow', channelId=data.channel_id) }}" method="post">
<button type="submit" value="Submit" class="ui red button">
<i class="user icon"></i>
Subscribe
</button>
</form>
{% else %}
<form action="{{ url_for('ytunfollow', channelId=data.channel_id) }}" method="post">
<button type="submit" value="Submit" class="ui red active button">
<i class="user icon"></i>
Unsubscribe
</button>
</form>
{%endif%}
{%endif%}
</div>
</div>
<br>
<br>
{% if data['error'] != None %}
{% include '_empty_feed.html' %}
{% else %}
<div class="ui centered cards">
{% for video in data['items'] %}
<div class="ui card">
<a class="image" href="{{url_for('watch', v=video.id, _method='GET')}}">
<img src="{{video.thumbnail}}">
</a>
<div class="content">
<a class="header" href="{{url_for('watch', v=video.id, _method='GET')}}">{{video.title}}</a>
<div class="meta">
<a class="break-word" href="{{url_for('channel', id=video.channel_id)}}">{{data.channel_name}}</a>
</div>
</div>
<div class="extra content">
<span class="left floated like">
<i class="eye icon"></i>
{{video.approx_view_count}}
</span>
{%if video.duration == "PREMIERING NOW" or video.duration == "LIVE"%}
<span class="right floated star">
<i class="red circle icon"></i>
LIVE
</span>
{%else%}
<span class="right floated star">
<i class="clock icon"></i>
{{video.time_published}}
</span>
{%endif%}
</div>
</div>
{% endfor %}
</div>
{% endif %}
<br>
<div class="ui center aligned text container">
<a href="{{prev_page}}"> <button class="ui left attached button"><i class="angle red left icon"></i></button> </a>
<a href="{{next_page}}"> <button class="right attached ui button"><i class="angle red right icon"></i></button></a>
</div>
<br>
{% endblock %}

View File

@ -1,35 +1,29 @@
{% extends "base.html" %}
{% block content %}
<div style="margin: 0em;" class="ui one column centered grid">
<div style="margin-top: 1em;" class="row">
<img class="ui tiny circular image" src="{{ url_for('static',filename='img/avatars/')}}{{range(1, 12) | random}}.png">
</div>
<div style="margin: 1.5em;" class="row">
<h2 class="ui header">Accounts you follow ({{ count }}):</h2>
</div>
</div>
<hr>
<div class="ui text container">
<div class="row">
<h2 class="ui header">Following ({{ count }}):</h2>
</div>
<div style="margin: 0em;" class="ui one column centered grid">
<div class="ui middle aligned divided list">
{% for acc in accounts %}
<div class="item">
<div class="right floated content">
<p>
<form action="{{ url_for('unfollowList', username=acc.username) }}" method="post">
{{ form.hidden_tag() }}
{{ form.submit(value='Unfollow') }}
</form>
</p>
</div>
<img class="ui avatar image" src="{{ url_for('static',filename='img/avatars/')}}{{range(1, 12) | random}}.png">
<div class="content">
{{acc.username}}
</div>
<div class="ui relaxed divided list">
{% for acc in accounts %}
<div class="item">
<div class="right floated content">
<p>
<form action="{{ url_for('unfollow', username=acc.username) }}" method="post">
{{ form.hidden_tag() }}
{{ form.submit(value='Unfollow') }}
</form>
</p>
</div>
<div class="content">
<a href="{{ url_for('u',username=acc.username)}}" class="header">{{acc.username}}</a>
<div class="description">@{{acc.username}}</div>
</div>
</div>
{% endfor %}
</div>
{% endfor %}
</div>
</div>
{% endblock %}

66
app/templates/home.html Normal file
View File

@ -0,0 +1,66 @@
{% extends "base.html" %}
{% block content %}
<style>
.ui.button {
cursor: pointer;
display: inline-block;
min-height: 1em;
outline: none;
border: none;
vertical-align: baseline;
background: #E0E1E2 none;
color: rgba(0, 0, 0, 0.6);
font-family: 'Lato', 'Helvsetica Neue', Arial, Helvetica, sans-serif;
margin: 0em 0.25em 0em 0em;
padding: 0.78571429em 1.5em 0.78571429em;
text-transform: none;
text-shadow: none;
font-weight: bold;
line-height: 1em;
font-style: normal;
text-align: center;
text-decoration: none;
border-radius: 0.28571429rem;
-webkit-box-shadow: 0px 0px 0px 1px transparent inset, 0px 0em 0px 0px rgba(34, 36, 38, 0.15) inset;
box-shadow: 0px 0px 0px 1px transparent inset, 0px 0em 0px 0px rgba(34, 36, 38, 0.15) inset;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
-webkit-transition: opacity 0.1s ease, background-color 0.1s ease, color 0.1s ease, background 0.1s ease, -webkit-box-shadow 0.1s ease;
transition: opacity 0.1s ease, background-color 0.1s ease, color 0.1s ease, background 0.1s ease, -webkit-box-shadow 0.1s ease;
transition: opacity 0.1s ease, background-color 0.1s ease, color 0.1s ease, box-shadow 0.1s ease, background 0.1s ease;
transition: opacity 0.1s ease, background-color 0.1s ease, color 0.1s ease, box-shadow 0.1s ease, background 0.1s ease, -webkit-box-shadow 0.1s ease;
will-change: '';
-webkit-tap-highlight-color: transparent;
}
</style>
{% if config.show_admin_message %}
<div class="text container ui">
<div class="ui warning message">
<div class="header">
{{config.admin_message_title|safe}}
</div>
{{config.admin_message|safe}}
</div>
</div>
{% endif %}
<div style="margin: 2em" class="ui one column centered grid">
<div class="row">
<div class="column">
<h2 class="ui center aligned header">
Welcome back, {{current_user.username}}!
<div class="sub header">Choose a platform</div>
</h2>
</div>
</div>
<div class="row">
<a style="padding: .2em" href="{{ url_for('twitter') }}"><button class="massive teal ui button">Twitter</button></a>
<a style="padding: .2em" href="{{ url_for('youtube') }}"><button class="massive red ui button">Youtube</button></a>
</div>
</div>
{% endblock %}

View File

@ -1,23 +0,0 @@
{% extends "base.html" %}
{% block content %}
<div style="padding: 1.3em;" class="ui one column centered grid">
<h2 class="ui blue header">
Hi, {{ current_user.username }}
<div class="sub header">Following: {{ followedCount }}</div>
</h2>
</div>
<hr>
<div class="ui one column grid" id="card-container">
{% if posts %}
{% for post in posts %}
{% if post.isRT %}
{% include '_post.html' %}
{% else %}
{% include '_post_nort.html' %}
{% endif %}
{% endfor %}
{% else %}
<div>No posts</div>
{% endif %}
{% endblock %}

View File

@ -1,15 +0,0 @@
{% extends "base.html" %}
{% block content %}
<br>
<br>
{% if videos %}
<div class="ui centered cards">
{% for video in videos %}
{% include '_video_item.html' %}
{% endfor %}
</div>
{% else %}
{% include '_empty_feed.html' %}
{% endif %}
{% endblock %}

View File

@ -1,13 +1,13 @@
{% extends "base.html" %}
{% block content %}
<h2 class="ui centered header">Login</h2>
<div class="ui grid">
<div class="ui one column stackable center aligned page grid" id="container">
<div class="row">
<h2 class="ui centered header">LOGIN</h2>
<div class="text center aligned container ui" id="container">
<div class="text center aligned container ui">
<form class="ui form" action="" method="post" novalidate>
{{ form.hidden_tag() }}
<p>
<i class="user icon"></i>
{{ form.username.label }}<br>
{{ form.username(size=32) }}<br>
{% for error in form.username.errors %}
@ -15,6 +15,7 @@
{% endfor %}
</p>
<p>
<i class="key icon"></i>
{{ form.password.label }}<br>
{{ form.password(size=32) }}<br>
{% for error in form.password.errors %}
@ -25,11 +26,8 @@
<p>{{ form.submit() }}</p>
</form>
</div>
<div class="row">
<div class="ui compact centered message">
<p>New user? <a href="{{ url_for('register') }}">Click to Register!</a></p>
</div>
<div class="text center aligned container ui">
<a href="{{ url_for('register') }}"><button class="ui button">Register</button></a>
</div>
</div>
</div>
{% endblock %}

View File

@ -1,39 +1,37 @@
{% extends "base.html" %}
{% block content %}
<h2 class="ui centered header">Register</h2>
<div class="ui one column centered grid" id="container">
<form class="ui form" action="" method="post">
{{ form.hidden_tag() }}
<p>
{{ form.username.label }}<br>
{{ form.username(size=32) }}<br>
{% for error in form.username.errors %}
<span style="color: red;">[{{ error }}]</span>
{% endfor %}
</p>
<p>
{{ form.email.label }}<br>
{{ form.email(size=64) }}<br>
{% for error in form.email.errors %}
<span style="color: red;">[{{ error }}]</span>
{% endfor %}
</p>
<p>
{{ form.password.label }}<br>
{{ form.password(size=32) }}<br>
{% for error in form.password.errors %}
<span style="color: red;">[{{ error }}]</span>
{% endfor %}
</p>
<p>
{{ form.password2.label }}<br>
{{ form.password2(size=32) }}<br>
{% for error in form.password2.errors %}
<span style="color: red;">[{{ error }}]</span>
{% endfor %}
</p>
<p>{{ form.submit() }}</p>
</form>
</div>
{% if registrations %}
<h2 class="ui centered header">Register</h2>
<h5 class="ui centered header"><a href="https://github.com/ytorg/Yotter#why-do-i-have-to-register-to-use-yotter">Why do I have to register?</a></h5>
<div class="ui text container" id="container">
<form class="ui form" action="" method="post">
{{ form.hidden_tag() }}
<p>
{{ form.username.label }}<br>
{{ form.username(size=32) }}<br>
{% for error in form.username.errors %}
<span style="color: red;">[{{ error }}]</span>
{% endfor %}
</p>
<p>
{{ form.password.label }}<br>
{{ form.password(size=32) }}<br>
{% for error in form.password.errors %}
<span style="color: red;">[{{ error }}]</span>
{% endfor %}
</p>
<p>
{{ form.password2.label }}<br>
{{ form.password2(size=32) }}<br>
{% for error in form.password2.errors %}
<span style="color: red;">[{{ error }}]</span>
{% endfor %}
</p>
<p>{{ form.submit() }}</p>
</form>
</div>
{% else %}
{% include '_closed_registrations.html' %}
{% endif %}
{% endblock %}

View File

@ -1,12 +1,12 @@
{% extends "base.html" %}
{% block content %}
<div class="ui one column centered grid">
<form class="ui form" action="" method="post" novalidate>
<div class="ui text container">
<form class="center aligned ui form" action="" method="post" novalidate>
{{ form.hidden_tag() }}
<p>
{{ form.username.label }}<br>
{{ form.username(size=32) }}<br>
{{ form.username(size=32, autofocus=true) }}<br>
{% for error in form.username.errors %}
<span style="color: red;">[{{ error }}]</span>
{% endfor %}
@ -15,18 +15,21 @@
</form>
{% if results %}
<div style="margin: 0em;" class="ui one column centered grid">
<div class="ui center aligned divided list">
<div class="ui relaxed divided list">
{% for res in results %}
<div class="item">
<img class="ui avatar image" src="{{ url_for('static',filename='img/avatars/')}}{{range(1, 12) | random}}.png">
<img alt="Avatar" class="ui avatar image" src="{{ res.avatar }}">
<div class="content">
<a href="/user/{{res}}">{{res}}</a>
{% if res.fullName|length > 20%}
<a class="header" href="/u/{{res.username}}">{{res.fullName[0:23]}}...</a>
{% else %}
<a class="header" href="/u/{{res.username}}">{{res.fullName}}</a>
{% endif %}
<div class="description">{{res.username}}</div>
</div>
</div>
{% endfor %}
</div>
</div>
{% endif %}
</div>

View File

@ -2,7 +2,7 @@
{% block content %}
<br>
<div class="ui one column centered grid">
<div class="ui center aligned text container">
<h2 class="ui icon header">
<i class="settings icon"></i>
<div class="content">
@ -11,19 +11,43 @@
</div>
</h2>
</div>
<hr>
<br>
<div class="ui one column centered grid">
<div class="ui relaxed divided list">
<div class="item">
<i class="large download middle aligned icon"></i>
<div class="content">
<a href="{{ url_for('export') }}" class="header">Export Data</a>
<div class="description">Export data into JSON file</div>
<h2 class="ui centered header">
Imports can take up to 2 minutes.
<div class="sub header">You can still use Yotter.</div>
</h2>
<div class="ui center aligned text container">
<div class="ui segments">
<div class="ui segment">
<div class="item">
<i class="large download middle aligned icon"></i>
<div class="content">
<div class="description"><h5 class="ui header">Export data into JSON file</h5></div>
<a href="{{ url_for('export') }}" class="header">Export Data</a>
</div>
</div>
</div>
<div class="item">
<div class="ui blue segment">
<i class="large upload middle aligned icon"></i>
<div class="content">
<div class="description"><h5 class="ui header">Import subscription data</h5></div>
<form action = "{{ url_for('importdata') }}" method = "POST" enctype = "multipart/form-data">
<input type = "file" name = "file"/>
<input type = "submit"/>
<br>
<label class="radio-inline">
<input type="radio" name="import_format" id="yotter" value="yotter" checked> Yotter
</label>
<label class="radio-inline" data-tooltip="Includes FreeTube, Invidious and NewPipe.">
<input type="radio" name="import_format" id="youtube" value="youtube"> Youtube
</label>
</form>
</div>
</div>
</div>
<!--<div class="item">
<i class="large moon middle aligned icon"></i>
<div class="content">
<div class="ui slider checkbox">
@ -41,7 +65,45 @@
<div class="description">Show links instead</div>
</div>
</div>
</div>-->
<div class="ui segment">
<label for="toggle">I want to delete my account.</label>
<input type="checkbox" id="toggle">
<div class="control-me"><a href="/deleteme"><button class="ui red button">Delete account</button></a></div>
</div>
<!--
{% if admin %}
<div class="ui segment">
<h2 class="ui centered header">
Admin tools
</h2>
<label for="toggle">Delete accounts with last login older than {{config.max_old_user_days}} days.</label> <br>
<a href="/clear_inactive_users/{{current_user.password_hash}}"><button class="ui red button">Delete</button></a></div>
</div>
{% endif %}-->
<!-- INSTANCE INFO -->
<h1 class="ui header">{{config.serverName}} Info</h1>
<div class="ui segments">
<div class="ui segment">
<p><b>Total users:</b> {{info.totalUsers}}</p>
</div>
<div class="ui segment">
<p><b>Active users:</b> {{info.active}}</p>
</div>
<div class="ui segment">
<p><b>Server location:</b> {{config.serverLocation}}</p>
</div>
{% if config.donate_url %}
<div class="ui segment">
<p><a href="{{config.donate_url}}">Consider making a donation to the instance</a></p>
</div>
{% endif %}
<div class="ui segment">
<p><a href="https://github.com/pluja/Yotter#donate">Donate to the Yotter developer</a></p>
</div>
</div>
</div>
{% endblock %}

55
app/templates/status.html Normal file
View File

@ -0,0 +1,55 @@
{% extends "base.html" %}
{% block content %}
<div class="ui text container center aligned centered">
<div class="ui placeholder segment">
<div class="ui two column stackable center aligned grid">
<div class="ui vertical divider">
{%if cani%}
:)
{%else%}
:(
{%endif%}
</div>
<div class="middle aligned row">
<div class="column">
<h3 class="ui header"> Capacity </h3>
<div class="ui icon header">
{%if cani%}
<i class="green users icon"></i>
{%else%}
<i class="red users icon"></i>
{%endif%}
{{count}}/{{max}}
</div>
</div>
<div class="column">
<div class="ui icon header">
<i class="user circle outline icon"></i>
Can I register?
<h5 class="ui centered header"><a href="https://github.com/ytorg/Yotter#why-do-i-have-to-register-to-use-yotter">Why do I have to register?</a></h5>
</div>
{%if cani%}
<a href="/register"><div class="ui green button">
Yes!
</div></a>
{%else%}
<a href="#!"><div class="ui disabled red button">
It's full!
</div></a>
{%endif%}
</div>
</div>
</div>
</div>
<div class="ui text container center aligned centered">
<div class="ui segments">
<div class="ui segment">
<p>Yotter version: <b><a href="https://github.com/ytorg/Yotter/tags">{{tag}}</a></b></p>
<p>Latest update: <b><a href="https://github.com/ytorg/Yotter/commits/">{{update}}</a></b></p>
<p>Commit hash: <b><a href="https://github.com/ytorg/Yotter/commits/">{{hash}}</a></b></p>
</div>
</div>
</div>
{%endblock%}

View File

@ -0,0 +1,43 @@
{% extends "base.html" %}
{% block content %}
<div class="text container centered">
<a style="padding: 1.3em; display: block;" href="{{ url_for('following') }}" class="ui small teal statistic">
<div class="value">
{{ followedCount }}
</div>
<div class="label">
Following
</div>
</a>
</div>
<div class="text container" id="card-container">
{% if posts %}
{% for post in posts %}
{% include '_twitter_post.html' %}
{% endfor %}
{% else %}
{% include '_empty_feed.html' %}
{% endif %}
<div class="scroller">
<a href="#top" class="ui button">
<i style="margin: 0;" class="chevron up icon"></i>
</a>
</div>
</div>
<div class="text container center aligned">
<div class="ui centered pagination menu">
{%for page in range(init_page, pages)%}
{% if page == actual_page%}
<a href="/twitter/{{page}}" class="active item">
{{page}}
</a>
{% else %}
<a href="/twitter/{{page}}" class="item">
{{page}}
</a>
{% endif %}
{% endfor %}
</div>
</div>
{% endblock %}

View File

@ -1,54 +1,108 @@
{% extends "base.html" %}
{% block content %}
<div class="blue ui centered card">
<div class="content">
<div class="center aligned author">
<img class="ui avatar image" src="{{ posts[0].userProfilePic }}"> {{ twitterAt }}
<div class="ui text container center aligned">
<div class="ui segments">
<div class="ui centered vertical segment">
<h2 class="ui header">
<img src="{{user.profilePic}}" class="ui circular image">
{{user.profileFullName}} <span style="color:grey;font-size: small;">({{user.profileUsername}})</span>
</h2>
</div>
<div class="ui horizontal segments">
<div class="ui segment">
<div class="ui centered vertical segment">
<p>{{user.profileBio}}</p>
</div>
</div>
<div class="ui segment">
{% if not current_user.is_following_tw(user.profileUsername.replace('@','')) %}
<p>
<form action="{{ url_for('follow', username=user.profileUsername.replace('@','')) }}" method="post">
{{ form.hidden_tag() }}
{{ form.submit(value='Follow') }}
</form>
</p>
{% else %}
<p>
<form action="{{ url_for('unfollow', username=user.profileUsername.replace('@','')) }}" method="post">
{{ form.hidden_tag() }}
{{ form.submit(value='Unfollow') }}
</form>
</p>
{% endif %}
</div>
</div>
<div class="ui horizontal segments">
<div class="ui segment">
<div class="statistic">
<div class="value">
<b>{{user.followers}}</b>
</div>
<div class="label">
<b>FOLLOWERS</b>
</div>
</div>
</div>
<div class="ui segment">
<div class="statistic">
<div class="value">
<b>{{user.following}}</b>
</div>
<div class="label">
<b>FOLLOWING</b>
</div>
</div>
</div>
<div class="ui segment">
<div class="statistic">
<div class="value">
<b>{{user.tweets}}</b>
</div>
<div class="label">
<b>TWEETS</b>
</div>
</div>
</div>
<div class="ui segment">
<div class="statistic">
<div class="value">
<b>{{user.likes}}</b>
</div>
<div class="label">
<b>LIKES</b>
</div>
</div>
</div>
</div>
<div style="margin: .1em" class="center aligned header"><a href="https://nitter.net/{{ user.username }}">{{ posts[0].twitterName }}</a></div>
<div class="center aligned description">
<a>
<i class="users icon"></i>
{{ user.followers.count() }}
</a>
</div>
</div>
<div class="extra content">
<div class="ui one column centered grid">
{% if user == current_user %}
<p><a>This is your profile</a></p>
{% elif not current_user.is_following(user) %}
<p>
<form action="{{ url_for('follow', username=user.username) }}" method="post">
{{ form.hidden_tag() }}
{{ form.submit(value='Follow') }}
</form>
</p>
{% else %}
<p>
<form action="{{ url_for('unfollow', username=user.username) }}" method="post">
{{ form.hidden_tag() }}
{{ form.submit(value='Unfollow') }}
</form>
</p>
{% endif %}
</div>
</div>
</div>
<div class="ui one column grid" id="card-container">
{% if not posts %}
{% include '_empty_feed.html' %}
{% else %}
{% for post in posts %}
{% if post.isRT %}
{% include '_post.html' %}
{% else %}
{% include '_post_nort.html' %}
{% endif %}
{% endfor %}
{% endif %}
<div style="margin-top: 15px;" class="text container" id="card-container">
{% if not posts %}
<div style="margin-top: 20px;" class="ui container center aligned">
<h2> <i class="window close outline icon"></i> This feed is empty. </h3>
</div>
{% elif posts == 'Protected' %}
<div style="margin-top: 20px;" class="ui container center aligned">
<h2> <i class="lock icon"></i> This account's tweets are protected. </h3>
</div>
{% else %}
{% for post in posts %}
{% include '_twitter_post.html' %}
{% endfor %}
<div class="scroller">
<a href="#top" class="ui button">
<i style="margin: 0;" class="chevron up icon"></i>
</a>
</div>
<br>
<div class="ui center aligned text container">
<a href="/{{user.profileUsername}}/{{prev_page}}"> <button class="ui left attached button"><i class="angle blue left icon"></i></button> </a>
<a href="/{{user.profileUsername}}/{{page+1}}"> <button class="right attached ui button"><i class="angle blue right icon"></i></button></a>
</div>
<br>
{% endif %}
</div>
{% endblock %}

View File

@ -1,43 +1,275 @@
<head>
<link rel="stylesheet" type= "text/css" href="{{ url_for('static',filename='video-js.min.css') }}">
<script src="{{ url_for('static',filename='video.min.js') }}"></script>
<link rel="stylesheet" type= "text/css" href="{{ url_for('static',filename='quality-selector.css') }}">
<script src="{{ url_for('static',filename='videojs-quality-selector.min.js') }}"></script>
</head>
{% extends "base.html" %}
{% block content %}
<div style="margin-top: 2em;" class="ui one column centered grid">
<iframe id='ivplayer' width='640' height='360' src='https://{{video.instance}}/embed/{{video.id}}' style='border:none;'>
</iframe>
<div style="width: 80%;" class="ui container">
</div>
<div style="margin-top: 2em;" class="ui one column center aligned grid">
<a href="https://{{video.instance}}/watch?v={{video.id}}"><h2 class="ui header">{{video.title}}</h2></a>
</div>
<div style="margin-top: 2em;" class="ui one column center aligned grid">
<a target="_blank" href="https://{{video.instance}}{{video.authorUrl}}" class="ui image label">
<img src="{{video.authorThumb}}">
{%if video.author.__len__() > 8%}
{{video.author[0:8]+'...'}}
{% if info.error == True %}
<div class="ui center aligned text container">
<div class="ui segment">
<h3 class="ui header"><i class="times icon"></i> ERROR WITH VIDEO </h3>
<h5 class="ui header">Try to reload the page. Most times this solves the error.</h5>
<h4 class="ui header">Other reasons.</h4>
<div class="ui list">
<div class="item">
<div class="header"><i class="calendar icon"> </i>Scheduled Video</div>
Scheduled videos are not supported.
</div>
<div class="item">
<div class="header"><i class="red circle icon"> </i>Livestream video</div>
Livestream videos are not yet supported.
</div>
<div class="item">
<div class="header">Other reasons</div>
If none of the above is the case, you might have found a bug. <a href="https://github.com/ytorg/Yotter/issues/new/choose">Report it!</a>
</div>
</div>
<p>Sorry for the inconveninet. Yotter is in a Beta state, so expect errors!</p>
</div>
</div>
{% else %}
{% if info.start_time != None %}
{% elif info.is_live != None %}
<!--<div class="video-js-responsive-container vjs-hd">
<video-js id=live width="1080" class="video-js vjs-default-skin" controls>
<source
src="#"
type="application/x-mpegURL">
</video-js>
</div>-->
<div class="ui center aligned text container">
<div class="ui segment">
<h3 class="ui header"><i class="red small circle icon"></i> LIVESTREAM VIDEO</h3>
<h4 class="ui header">FEATURE AVAILABLE SOON</h4>
<h5 class="ui header">Livestreams are under developent and still not supported on Yotter.</h5>
</div>
</div>
{%else%}
{{video.author}}
<div class="video-js-responsive-container vjs-hd">
<video-js id="video-1" class="video-js vjs-default-skin vjs-big-play-centered"
qualitySelector
controls
autofocus
data-setup='{ "playbackRates": [0.5, 1, 1.25, 1.5, 1.75, 2] }'
width="1080"
buffered
preload="none">
{% if config.isInstance %}
{% for source in info.formats %}
<source src="{{source.url}}" type="video/{{source.ext}}" label="{{source.format_note}}">
{% endfor %}
{% endif %}
<p class="vjs-no-js">To view this video please enable JavaScript, and consider upgrading to a web browser that
<a href="http://videojs.com/html5-video-support/" target="_blank">supports HTML5 video</a></p>
</video-js>
</div>
{%endif%}
</a>
<div class="ui label">
<i class="eye icon"></i> {{video.viewCount}}
</div>
<div class="ui segments">
<div class="ui segment">
<h2 class="ui header break-word">{{info.title}}</h2>
</div>
<div class="ui horizontal segments">
<div class="center aligned ui segment">
<a href="{{ url_for('channel', id=info.channel_id)}}">
<i class="user icon"></i> <b>{{info.uploader}}</b>
</a>
<div class="label">
<i class="user icon"></i>{{info.subscriber_count}}
</div>
</div>
<div class="center aligned ui segment">
<div class="ui mini statistic">
<div class="value">
<i class="grey eye icon"></i> <b>{{info.view_count}}</b>
</div>
<div class="label">
views
</div>
</div>
</div>
<div class="center aligned ui segment">
{% if info.average_rating | int > 2.5 %}
<div class="ui mini statistic">
<div class="value">
<i class="green thumbs up icon"></i> <b>{{info.average_rating}}/5</b>
</div>
<div class="label">
Total: {{info.total_likes}} votes
</div>
</div>
{% else %}
<div class="ui mini statistic">
<div class="value">
<i class="red thumbs down icon"></i> <b>{{info.average_rating}}/5</b>
</div>
<div class="label">
Total: {{info.total_likes}} votes
</div>
</div>
{% endif %}
</div>
</div>
<div class="ui label">
<i class="thumbs up green icon"></i> {{video.likeCount}}
</div>
<div class="ui raised center aligned segment break-word">
<p><i class="grey music icon"></i><b>Audio Only</b></p>
<audio controls>
{% for format in info.audio_formats %}
<source src="{{format.url}}">
{%endfor%}
No audio available.
</audio>
</div>
<div class="ui label">
<i class="thumbs down red icon"></i> {{video.dislikeCount}}
</div>
</div>
<div class="ui raised segment break-word">
<p>{{info.description}}</p>
</div>
</div>
<div style="margin-top: 2em;" class="ui one column center aligned grid">
<div style="margin-bottom: 2em;" class="ui comments">
<h3 class="ui dividing header">Description</h3>
{{video.description}}
</div>
</div>
{%if videocomments%}
<div class="ui comments">
<h3 class="ui dividing header">Comments</h3>
{% for comment in videocomments %}
{% include '_video_comment.html' %}
{% endfor %}
</div>
{%endif%}
{% if info.live %}
<script src="{{ url_for('static',filename='videojs-http-streaming.min.js')}}"></script>
<script>
var player = videojs('live');
player.play();
</script>
{% endif %}
{%endif%}
<!-- SETUP QUALITY SELECTOR -->
<script>
videojs("video-1", {}, function() {
var player = this;
player.controlBar.addChild('QualitySelector');
});
</script>
<!-- SETUP CONTROL HOTKEYS -->
<script src="{{ url_for('static',filename='videojs.hotkeys.min.js') }}"></script>
<script>
// initialize the plugin
videojs('video-1').ready(function() {
this.hotkeys({
volumeStep: 0.1,
seekStep: 5,
enableMute: true,
enableFullscreen: true,
enableNumbers: false,
enableVolumeScroll: true,
enableHoverScroll: true,
// Mimic VLC seek behavior, and default to 5.
seekStep: function(e) {
if (e.ctrlKey && e.altKey) {
return 5*60;
} else if (e.ctrlKey) {
return 60;
} else if (e.altKey) {
return 10;
} else {
return 5;
}
},
// Enhance existing simple hotkey with a complex hotkey
fullscreenKey: function(e) {
// fullscreen with the F key or Ctrl+Enter
return ((e.which === 70) || (e.ctrlKey && e.which === 13));
},
// Custom Keys
customKeys: {
// Add new simple hotkey
simpleKey: {
key: function(e) {
// Toggle something with S Key
return (e.which === 83);
},
handler: function(player, options, e) {
// Example
if (player.paused()) {
player.play();
} else {
player.pause();
}
}
},
// Add new complex hotkey
complexKey: {
key: function(e) {
// Toggle something with CTRL + D Key
return (e.ctrlKey && e.which === 68);
},
handler: function(player, options, event) {
// Example
if (options.enableMute) {
player.muted(!player.muted());
}
}
},
// Override number keys example from https://github.com/ctd1500/videojs-hotkeys/pull/36
numbersKey: {
key: function(event) {
// Override number keys
return ((event.which > 47 && event.which < 59) || (event.which > 95 && event.which < 106));
},
handler: function(player, options, event) {
// Do not handle if enableModifiersForNumbers set to false and keys are Ctrl, Cmd or Alt
if (options.enableModifiersForNumbers || !(event.metaKey || event.ctrlKey || event.altKey)) {
var sub = 48;
if (event.which > 95) {
sub = 96;
}
var number = event.which - sub;
player.currentTime(player.duration() * number * 0.1);
}
}
},
emptyHotkey: {
// Empty
},
withoutKey: {
handler: function(player, options, event) {
console.log('withoutKey handler');
}
},
withoutHandler: {
key: function(e) {
return true;
}
},
malformedKey: {
key: function() {
console.log('I have a malformed customKey. The Key function must return a boolean.');
},
handler: function(player, options, event) {
//Empty
}
}
}
});
});
</script>
{% endblock %}

View File

@ -0,0 +1,23 @@
{% extends "base.html" %}
{% block content %}
<div style="padding: 1.3em;" class="ui one column centered grid">
<a href="{{ url_for('ytfollowing') }}"><div class="ui small red statistic">
<div class="value">
{{ followCount }}
</div>
<div class="label">
Following
</div>
</div></a>
</div>
{% if videos %}
<div class="ui centered cards">
{% for video in videos %}
{% include '_video_item.html' %}
{% endfor %}
</div>
{% else %}
{% include '_empty_feed.html' %}
{% endif %}
{% endblock %}

View File

@ -0,0 +1,35 @@
{% extends "base.html" %}
{% block content %}
<div style="padding: 1.3em;" class="ui one column centered grid">
<a href="{{ url_for('ytfollowing') }}"><div class="ui red statistic">
<div class="value">
{{ channelCount }}
</div>
<div class="label">
Following
</div>
</div></a>
</div>
<div class="ui text container">
<div class="ui relaxed divided list">
{% for channel in channelList %}
<div class="item">
<div class="right floated content">
<p>
<form action="{{ url_for('ytunfollow', channelId=channel.channelId) }}" method="post">
{{ form.hidden_tag() }}
{{ form.submit(value='Unfollow') }}
</form>
</p>
</div>
<div class="content">
<a href="{{ url_for('channel',id=channel.channelId)}}" class="header">{{channel.channelName}}</a>
</div>
</div>
{% endfor %}
</div>
</div>
{% endblock %}

View File

@ -1,77 +1,97 @@
{% extends "base.html" %}
{% block content %}
<div class="ui one column centered grid">
<form class="ui form" action="" method="post" novalidate>
{{ form.hidden_tag() }}
<p>
{{ form.channelId.label }}<br>
{{ form.channelId(size=32) }}<br>
{% for error in form.channelId.errors %}
<span style="color: red;">[{{ error }}]</span>
{% endfor %}
</p>
<p>{{ form.submit() }}</p>
<div class="ui center aligned text container">
<form action="{{url_for('ytsearch', _method='GET')}}">
<div class="ui search">
<input class="prompt" name="q" type="text" placeholder="Search..." autofocus>
<select name="s" id="sort">
<option value="0">Relevance</option>
<option value="3">Views</option>
<option value="2">Date</option>
<option value="1">Rating</option>
</select>
</div>
</form>
<div class="ui one column middle aligned grid">
<div class="ui message">
<div class="header">
Tip: Videos are shown below channels.
</div>
<p>Just scroll down!</p>
</div>
</div>
</div>
<div class="ui text container">
{% if results %}
<div class="ui one column centered grid">
<div class="ui middle aligned divided list">
<h3 class="ui dividing header">Users</h3>
{% for res in results %}
<div class="item">
<div class="right floated content">
{% if not current_user.is_following_yt(res.channelId) %}
<p>
<form action="{{ url_for('ytfollow', channelId=res.channelId) }}" method="post">
{{ btform.hidden_tag() }}
{{ btform.submit(value='Follow') }}
</form>
</p>
{% else %}
<p>
<form action="{{ url_for('ytunfollow', channelId=res.channelId) }}" method="post">
{{ btform.hidden_tag() }}
{{ btform.submit(value='Unfollow') }}
</form>
</p>
{% endif %}
</div>
<img class="ui avatar image" src="{{ res.thumbnail }}">
<div class="content">
{{res.username}}
<div class="ui label">
<i class="user icon"></i> {{res.subCount}}
{% if results.channels %}
<h3 class="ui dividing header">Users</h3>
{% endif %}
<div class="ui relaxed divided list">
{% for res in results.channels %}
<div class="item">
<div class="image">
{% if config.isInstance %}
<img src="{{res.thumbnail}}" alt="Avatar">
{% else %}
<img alt="Avatar" src="{{ url_for('img', url=res.thumbnail) }}">
{% endif %}
</div>
<div class="content">
<a class = "header" href="{{ url_for('channel', id=res.channelId)}}">{{res.username}}</a>
<div class="meta">
<span>{{res.description}}</span>
</div>
<div class="description">
<p></p>
</div>
<div class="extra">
<div class="ui label">
<i class="user icon"></i> {{res.suscribers}}
</div>
<div class="ui label">
<i class="video icon"></i> {{res.videos}}
</div>
{% if restricted or current_user.is_authenticated %}
<div class="right floated content">
{% if not current_user.is_following_yt(res.channelId) %}
<form action="{{ url_for('ytfollow', channelId=res.channelId) }}" method="post">
{{ btform.hidden_tag() }}
{{ btform.submit(value='Follow') }}
</form>
{% else %}
<form action="{{ url_for('ytunfollow', channelId=res.channelId) }}" method="post">
{{ btform.hidden_tag() }}
{{ btform.submit(value='Unfollow') }}
</form>
{% endif %}
</div>
{% endif %}
</div>
</div>
</div>
</div>
</div>
{% endfor %}
</div>
<div class="ui middle aligned divided list">
<h3 class="ui dividing header">Videos</h3>
{% if videos %}
<div class="ui centered cards">
{% for video in videos %}
{% include '_video_item.html' %}
{% endfor %}
</div>
{% else %}
{% include '_empty_feed.html' %}
{% endif %}
</div>
</div>
{% endif %}
</div>
<div class="ui middle aligned divided list">
{% if results.videos %}
<h3 class="ui dividing header">Videos</h3>
<div class="ui centered cards">
{% for video in results.videos %}
{% include '_video_item.html' %}
{% endfor %}
</div>
{% endif %}
</div>
{%if ppage%}
<div class="ui text container center aligned">
<a href="{{ppage}}"><button class="ui labeled icon button">
<i class="left arrow icon"></i>
Prev
</button></a>
<a href="{{npage}}"><button class="ui right labeled icon button">
<i class="right arrow icon"></i>
Next
</button></a>
</div>
{%endif%}
</div>
</div>
{% endblock %}

View File

@ -1,45 +0,0 @@
from datetime import datetime, timedelta
import unittest
from app import app, db
from app.models import User, Post
class UserModelCase(unittest.TestCase):
def setUp(self):
app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite://'
db.create_all()
def tearDown(self):
db.session.remove()
db.drop_all()
def test_password_hashing(self):
u = User(username='susan')
u.set_password('cat')
self.assertFalse(u.check_password('dog'))
self.assertTrue(u.check_password('cat'))
def test_follow(self):
u1 = User(username='john', email='john@example.com')
u2 = User(username='Snowden', realUser=False)
db.session.add(u1)
db.session.add(u2)
db.session.commit()
self.assertEqual(u1.followed.all(), [])
self.assertEqual(u1.followers.all(), [])
u1.follow(u2)
db.session.commit()
self.assertTrue(u1.is_following(u2))
self.assertEqual(u1.followed.count(), 1)
self.assertEqual(u1.followed.first().username, 'Snowden')
self.assertEqual(u2.followers.count(), 1)
self.assertEqual(u2.followers.first().username, 'john')
u1.unfollow(u2)
db.session.commit()
self.assertFalse(u1.is_following(u2))
self.assertEqual(u1.followed.count(), 0)
self.assertEqual(u2.followers.count(), 0)
if __name__ == '__main__':
unittest.main(verbosity=2)

View File

@ -1,6 +1,8 @@
import os
from dotenv import load_dotenv
basedir = os.path.abspath(os.path.dirname(__file__))
load_dotenv(os.path.join(basedir, '.env'))
class Config(object):
SECRET_KEY = os.environ.get('SECRET_KEY') or 'you-will-never-guess'

52
docker-compose.yml Normal file
View File

@ -0,0 +1,52 @@
version: "3.8"
services:
mariadb:
image: mariadb:10.5
environment:
MYSQL_ROOT_PASSWORD: changeme
MYSQL_DATABASE: yotter
MYSQL_USER: yotter
MYSQL_PASSWORD: changeme
restart: unless-stopped
volumes:
- mysql:/var/lib/mysql
healthcheck:
test: ["CMD", "mysqladmin", "ping", "--silent"]
nginx:
image: ytorg/nginx:latest
restart: unless-stopped
environment:
HOSTNAME: 'changeme.example.com'
HTTP_PORT: 8080
YOTTER_ADDRESS: 'http://yotter:5000'
YTPROXY_ADDRESS: 'http://unix:/var/run/ytproxy/http-proxy.sock'
ports:
- "127.0.0.1:8080:8080"
volumes:
- "/var/run/ytproxy:/app/socket/"
ytproxy:
image: 1337kavin/ytproxy:latest
restart: unless-stopped
volumes:
- "/var/run/ytproxy:/app/socket/"
network_mode: host
yotter:
image: ytorg/yotter:latest
restart: unless-stopped
ports:
- "127.0.0.1:5000:5000"
environment:
DATABASE_URL: mysql+pymysql://yotter:changeme@mariadb:3306/yotter
depends_on:
- mariadb
- ytproxy
volumes:
- migrations:/usr/src/app/migrations
- ./yotter-config.json:/usr/src/app/yotter-config.json
healthcheck:
test: ["CMD", "wget" ,"--no-verbose", "--tries=1", "--spider", "http://localhost:5000"]
interval: 1m
timeout: 3s
volumes:
mysql:
migrations:

12
nginx.Dockerfile Normal file
View File

@ -0,0 +1,12 @@
FROM nginx:mainline-alpine
WORKDIR /var/www
COPY ./app/static ./static
COPY ./nginx.conf.tmpl /nginx.conf.tmpl
ENV HOSTNAME= \
HTTP_PORT=80 \
YOTTER_ADDRESS=http://127.0.0.1:5000 \
YTPROXY_ADDRESS=http://unix:/var/run/ytproxy/http-proxy.sock
CMD ["/bin/sh", "-c", "envsubst '${HOSTNAME} ${HTTP_PORT} ${YOTTER_ADDRESS} ${YTPROXY_ADDRESS}' < /nginx.conf.tmpl > /etc/nginx/conf.d/default.conf && nginx -g 'daemon off;'"]

View File

@ -0,0 +1,10 @@
.circleci
.git
.github
.gitignore
cache
Dockerfile
docker-compose.yml
LICENSE
*.md
dockerhash.txt

30
nginx.conf.tmpl Normal file
View File

@ -0,0 +1,30 @@
server {
listen ${HTTP_PORT};
server_name ${HOSTNAME};
access_log off;
location / {
proxy_pass ${YOTTER_ADDRESS};
proxy_set_header Host $host;
proxy_http_version 1.1;
proxy_set_header Connection "";
}
location /static/ {
root /var/www;
sendfile on;
aio threads=default;
}
location ~ (^/videoplayback$|/videoplayback/|/vi/|/a/|/ytc|/vi_webp/|/sb/) {
proxy_pass ${YTPROXY_ADDRESS};
add_header Access-Control-Allow-Origin *;
sendfile on;
tcp_nopush on;
aio_write on;
aio threads=default;
directio 512;
proxy_http_version 1.1;
proxy_set_header Connection "";
}
}

107
nitter/README.md Normal file
View File

@ -0,0 +1,107 @@
- [user.py](#userpy)
- [feed.py](#feedpy)
- [Tweets format examples](#tweets-format-examples)
## user.py
### get_user_info(username)
Returns the info of a particular Twitter user without tweets. If the user does not exist, it returns `False`.
##### Return example:
`user.get_user_info("Snowden")`
```
{
'profileFullName': 'Edward Snowden',
'profileUsername': '@Snowden',
'profileBio': 'I used to work for the government. Now I work for the public. President at @FreedomofPress.',
'tweets': '5,009',
'following': '1',
'followers': '4.41M',
'likes': '473',
'profilePic': 'https://nitter.net/pic/profile_images%2F648888480974508032%2F66_cUYfj.jpg'
}
```
### get_tweets(user, page=1)
Returns a list with the tweets on the user feed from the specified page (default is 1).
Example usage: `user.get_tweets("Snowden")`
### get_feed_tweets(html)
This function is used by `get_tweets`. This should not be used as it is a utility function. If you want to know more, you can explore the code.
## feed.py
### get_feed(usernames, daysMaxOld=10, includeRT=True)
This function returns a chronologically ordered feed given a list of usernames (i.e ['Snowden', 'DanielMicay', 'FluffyPony']). Optional parameters are:
* `daysMaxOld`: sets the maximum number of days that the feed posts that will be returned can be.
* `includeRT`: If `False` retweets will be excluded from the feed.
## Tweets format examples:
**Normal tweet**:
```
{
'op': '@Snowden',
'twitterName': 'Edward Snowden',
'timeStamp': '2020-11-03 23:11:40',
'date': 'Nov 3',
'content': Markup('Vote. There is still time.'),
'username': '@Snowden',
'isRT': False,
'profilePic': 'https://nitter.net/pic/profile_images%2F648888480974508032%2F66_cUYfj_normal.jpg',
'url': 'https://nitter.net/Snowden/status/1323764814817218560#m'
}
```
**Retweet**:
```
{
'op': '@StellaMoris1',
'twitterName': 'Stella Moris',
'timeStamp': '2020-11-02 10:21:09',
'date': 'Nov 2',
'content': Markup("Spoke to Julian. A friend of his killed himself in the early hours of this morning. His body is still in the cell on Julian's wing. Julian is devastated.\n\nManoel Santos was gay. He'd lived in UK for 20 years. The Home Office served him with a deportation notice to Brazil.(Thread)"),
'username': ' Edward Snowden retweeted',
'isRT': True,
'profilePic': 'https://nitter.net/pic/profile_images%2F1303198488184975360%2FiH4BdNIT_normal.jpg',
'url': 'https://nitter.net/StellaMoris1/status/1323208519315849217#m'
}
```
**Tweet / Retweet with images**:
```
{
'op': '@Reuters',
'twitterName': 'Reuters',
'timeStamp': '2020-11-02 10:35:07',
'date': 'Nov 2',
'content': Markup('U.S. whistleblower Edward Snowden seeks Russian passport for sake of future son <a href="http://reut.rs/3mNZQuf">reut.rs/3mNZQuf</a>'),
'username': ' Edward Snowden retweeted',
'isRT': True,
'profilePic': 'https://nitter.net/pic/profile_images%2F1194751949821939712%2F3VBu4_Sa_normal.jpg',
'url': 'https://nitter.net/Reuters/status/1323212031978295298#m',
'attachedImages': ['https://nitter.net/pic/media%2FElz-VKLWkAAvTf8.jpg%3Fname%3Dorig']
}
```
**Tweet quoting antoher user**
```
{
'op': '@lsjourneys',
'twitterName': 'Lsjourney',
'timeStamp': '2020-10-28 21:17:09',
'date': 'Oct 28',
'content': Markup('citizenfive 👶'),
'username': ' Edward Snowden retweeted',
'isRT': True,
'profilePic': 'https://nitter.net/pic/profile_images%2F647551437875101696%2FBA2I4vuf_normal.jpg',
'url': 'https://nitter.net/lsjourneys/status/1321561665117310979#m',
'isReply': True,
'replyingTweetContent': Markup('<div class="quote-text">A long time in the making: our greatest collaboration is coming soon.</div>'),
'replyAttachedImages': ['https://nitter.net/pic/media%2FElcdC-BXgAwtT79.jpg%3Fname%3Dorig'],
'replyingUser': '@lsjourneys'
}
```
> Video is not fully supported yet. A parameter `'attachedVideo': True` is added when a video is present on the tweet.

50
nitter/feed.py Normal file
View File

@ -0,0 +1,50 @@
from requests_futures.sessions import FuturesSession
from multiprocessing import Process
from werkzeug.datastructures import Headers
from concurrent.futures import as_completed
from numerize import numerize
from bs4 import BeautifulSoup
from operator import itemgetter, attrgetter
from re import findall
from nitter import user
import time, datetime
import requests
import bleach
import urllib
import json
import re
config = json.load(open('yotter-config.json'))
def get_feed(usernames, daysMaxOld=10, includeRT=True):
'''
Returns feed tweets given a set of usernames
'''
feedTweets = []
with FuturesSession() as session:
futures = [session.get(f'{config["nitterInstance"]}{u}') for u in usernames]
for future in as_completed(futures):
res = future.result().content.decode('utf-8')
html = BeautifulSoup(res, "html.parser")
feedPosts = user.get_feed_tweets(html)
feedTweets.append(feedPosts)
userFeed = []
for feed in feedTweets:
if not includeRT:
for tweet in feed:
if tweet['isRT']:
continue
else:
userFeed.append(tweet)
else:
userFeed+=feed
try:
for uf in userFeed:
if uf == 'emptyFeed':
userFeed.remove(uf)
userFeed.sort(key=lambda item:item['timeStamp'], reverse=True)
except:
print("Error sorting feed - nitter/feed.py")
return userFeed
return userFeed

175
nitter/user.py Normal file
View File

@ -0,0 +1,175 @@
from flask import Markup
from requests_futures.sessions import FuturesSession
from werkzeug.datastructures import Headers
from concurrent.futures import as_completed
from numerize import numerize
from bs4 import BeautifulSoup
from re import findall
import time, datetime
import requests
import bleach
import urllib
import json
import re
##########################
#### Config variables ####
##########################
config = json.load(open('yotter-config.json'))
config['nitterInstance']
def get_user_info(username):
response = urllib.request.urlopen(f'{config["nitterInstance"]}{username}').read()
#rssFeed = feedparser.parse(response.content)
html = BeautifulSoup(str(response), "lxml")
if html.body.find('div', attrs={'class':'error-panel'}):
return False
else:
html = html.body.find('div', attrs={'class':'profile-card'})
if html.find('a', attrs={'class':'profile-card-fullname'}):
fullName = html.find('a', attrs={'class':'profile-card-fullname'}).getText().encode('latin1').decode('unicode_escape').encode('latin1').decode('utf8')
else:
fullName = None
if html.find('div', attrs={'class':'profile-bio'}):
profileBio = html.find('div', attrs={'class':'profile-bio'}).getText().encode('latin1').decode('unicode_escape').encode('latin1').decode('utf8')
else:
profileBio = None
user = {
"profileFullName":fullName,
"profileUsername":html.find('a', attrs={'class':'profile-card-username'}).string.encode('latin_1').decode('unicode_escape').encode('latin_1').decode('utf8'),
"profileBio":profileBio,
"tweets":html.find_all('span', attrs={'class':'profile-stat-num'})[0].string,
"following":html.find_all('span', attrs={'class':'profile-stat-num'})[1].string,
"followers":numerize.numerize(int(html.find_all('span', attrs={'class':'profile-stat-num'})[2].string.replace(",",""))),
"likes":html.find_all('span', attrs={'class':'profile-stat-num'})[3].string,
"profilePic":config['nitterInstance'] + html.find('a', attrs={'class':'profile-card-avatar'})['href'][1:],
}
return user
def get_tweets(user, page=1):
feed = urllib.request.urlopen(f'{config["nitterInstance"]}{user}').read()
#Gather feedPosts
res = feed.decode('utf-8')
html = BeautifulSoup(res, "html.parser")
feedPosts = get_feed_tweets(html)
if page == 2:
nextPage = html.find('div', attrs={'class':'show-more'}).find('a')['href']
url = f'{config["nitterInstance"]}{user}{nextPage}'
print(url)
feed = urllib.request.urlopen(url).read()
res = feed.decode('utf-8')
html = BeautifulSoup(res, "html.parser")
feedPosts = get_feed_tweets(html)
return feedPosts
def yotterify(text):
URLS = ['https://youtube.com']
text = str(text)
for url in URLS:
text.replace(url, "")
return text
def get_feed_tweets(html):
feedPosts = []
if 'No items found' in str(html.body):
return 'Empty feed'
if "This account's tweets are protected." in str(html.body):
return 'Protected feed'
userFeed = html.find_all('div', attrs={'class':'timeline-item'})
if userFeed != []:
for post in userFeed[:-1]:
if 'show-more' in str(post):
continue
date_time_str = post.find('span', attrs={'class':'tweet-date'}).find('a')['title'].replace(",","")
if post.find('div', attrs={'class':'pinned'}):
if post.find('div', attrs={'class':'pinned'}).find('span', attrs={'icon-pin'}):
continue
tweet = {}
tweet['op'] = post.find('a', attrs={'class':'username'}).text
tweet['twitterName'] = post.find('a', attrs={'class':'fullname'}).text
tweet['timeStamp'] = str(datetime.datetime.strptime(date_time_str, '%d/%m/%Y %H:%M:%S'))
tweet['date'] = post.find('span', attrs={'class':'tweet-date'}).find('a').text
tweet['content'] = Markup(yotterify(post.find('div', attrs={'class':'tweet-content'}).decode_contents().replace("\n", "<br>")))
if post.find('div', attrs={'class':'retweet-header'}):
tweet['username'] = post.find('div', attrs={'class':'retweet-header'}).find('div', attrs={'class':'icon-container'}).text
tweet['isRT'] = True
else:
tweet['username'] = tweet['op']
tweet['isRT'] = False
tweet['profilePic'] = config['nitterInstance']+post.find('a', attrs={'class':'tweet-avatar'}).find('img')['src'][1:]
tweet['url'] = config['nitterInstance'] + post.find('a', attrs={'class':'tweet-link'})['href'][1:]
# Is quoting another tweet
if post.find('div', attrs={'class':'quote'}):
tweet['isReply'] = True
quote = post.find('div', attrs={'class':'quote'})
if 'unavailable' in str(quote):
tweet['unavailableReply'] = True
else:
tweet['unavailableReply'] = False
if not tweet['unavailableReply']:
if quote.find('div', attrs={'class':'quote-text'}):
try:
tweet['replyingTweetContent'] = Markup(quote.find('div', attrs={'class':'quote-text'}).replace("\n", "<br>"))
except:
tweet['replyingTweetContent'] = Markup(quote.find('div', attrs={'class':'quote-text'}))
if quote.find('a', attrs={'class':'still-image'}):
tweet['replyAttachedImages'] = []
images = quote.find_all('a', attrs={'class':'still-image'})
for img in images:
img = BeautifulSoup(str(img), "lxml")
url = config['nitterInstance'] + img.find('a')['href'][1:]
tweet['replyAttachedImages'].append(url)
tweet['replyingUser']=quote.find('a', attrs={'class':'username'}).text
post.find('div', attrs={'class':'quote'}).decompose()
else:
tweet['isReply'] = False
# Has attatchments
if post.find('div', attrs={'class':'attachments'}):
# Images
if post.find('div', attrs={'class':'attachments'}).find('a', attrs={'class':'still-image'}):
tweet['attachedImages'] = []
images = post.find('div', attrs={'class':'attachments'}).find_all('a', attrs={'class':'still-image'})
for img in images:
img = BeautifulSoup(str(img), 'lxml')
url = config['nitterInstance'] + img.find('a')['href'][1:]
tweet['attachedImages'].append(url)
else:
tweet['attachedImages'] = False
# Videos
if post.find('div', attrs={'attachments'}).find('div', attrs={'gallery-video'}):
tweet['attachedVideo'] = True
else:
tweet['attachedVideo'] = False
else:
tweet['attachedVideo'] = False
tweet['attachedImages'] = False
if post.find('div', attrs={'class':'tweet-stats'}):
stats = post.find('div', attrs={'class':'tweet-stats'}).find_all('span', attrs={'class':'tweet-stat'})
for stat in stats:
if 'comment' in str(stat):
tweet['comments'] = stat.find('div',attrs={'class':'icon-container'}).text
elif 'retweet' in str(stat):
tweet['retweets'] = stat.find('div',attrs={'class':'icon-container'}).text
elif 'heart' in str(stat):
tweet['likes'] = stat.find('div',attrs={'class':'icon-container'}).text
else:
tweet['quotes'] = stat.find('div',attrs={'class':'icon-container'}).text
feedPosts.append(tweet)
else:
return {"emptyFeed": True}
return feedPosts

46
pypy.Dockerfile Normal file
View File

@ -0,0 +1,46 @@
FROM pypy:3-slim-buster AS base
# Image to Build Dependencies
FROM base AS builder
WORKDIR /usr/src/app
COPY ./requirements.txt /usr/src/app
# Build Dependencies
RUN apt-get update \
&& apt-get install -yq build-essential libssl-dev libffi-dev libxml2-dev libxslt-dev zlib1g-dev curl \
&& rm -rf /var/lib/apt/lists/* /etc/apt/sources.list.d/*
# install rust toolchain
RUN curl https://sh.rustup.rs -sSf | \
sh -s -- --default-toolchain stable -y
ENV PATH=/root/.cargo/bin:$PATH
# Python Dependencies
RUN pip install --no-warn-script-location --ignore-installed --no-cache-dir --prefix=/install wheel cryptography gunicorn pymysql
RUN pip install --no-warn-script-location --ignore-installed --no-cache-dir --prefix=/install -r requirements.txt
# Runtime Environment Image
FROM base
WORKDIR /usr/src/app
COPY --from=builder /install/bin /usr/local/bin
COPY --from=builder /install/site-packages /opt/pypy/site-packages
RUN apt-get update && apt-get install -y \
libxml2 libxslt1.1 \
&& rm -rf /var/lib/apt/lists/* /etc/apt/sources.list.d/*
COPY . .
RUN flask db init
CMD flask db stamp head \
&& flask db migrate \
&& flask db upgrade \
&& gunicorn -b 0.0.0.0:5000 -k gevent -w 4 yotter:app
EXPOSE 5000

View File

@ -1,48 +1,44 @@
alembic==1.4.2
async-timeout==3.0.1
attrs==19.3.0
beautifulsoup4==4.9.1
bleach==3.1.5
bs4==0.0.1
certifi==2020.6.20
alembic==1.4.3
beautifulsoup4==4.9.3
bleach==3.3.0
cachetools==4.2.0
certifi==2020.12.5
chardet==3.0.4
click==7.1.2
defusedxml==0.6.0
dnspython==1.16.0
email-validator==1.1.1
feedparser==5.2.1
feedparser==6.0.2
Flask==1.1.2
Flask-Caching==1.9.0
Flask-Login==0.5.0
Flask-Migrate==2.5.3
Flask-SQLAlchemy==2.4.3
Flask-SQLAlchemy==2.4.4
Flask-WTF==0.14.3
future==0.18.2
gevent==20.6.2
greenlet==0.4.16
gevent==20.9.0
greenlet==0.4.17
idna==2.10
itsdangerous==1.1.0
Jinja2==2.11.2
llvmlite==0.33.0
lxml==4.5.2
Jinja2==2.11.3
lxml>=4.6.3
Mako==1.1.3
MarkupSafe==1.1.1
multidict==4.7.6
numpy==1.19.0
packaging==20.4
PyMySQL==0.9.3
numerize==0.12
packaging==20.8
pyparsing==2.4.7
PySocks==1.7.1
python-dateutil==2.8.1
python-dotenv==0.14.0
python-dotenv==0.15.0
python-editor==1.0.4
requests==2.24.0
requests==2.25.1
requests-futures==1.0.0
sgmllib3k==1.0.0
six==1.15.0
socks==0
soupsieve==2.0.1
SQLAlchemy==1.3.18
urllib3==1.25.9
SQLAlchemy==1.3.22
urllib3==1.26.5
webencodings==0.5.1
Werkzeug==1.0.1
WTForms==2.3.1
yarl==1.4.2
zope.event==4.4
zope.interface==5.1.0
WTForms==2.3.3
youtube-dlc==2020.11.11.post3
youtube-search-fork==1.2.5
zope.event==4.5.0
zope.interface==5.2.0

15
yotter-config.json Normal file
View File

@ -0,0 +1,15 @@
{
"serverName": "yotter.xyz",
"nitterInstance": "https://nitter.mastodont.cat/",
"maxInstanceUsers": 200,
"serverLocation": "Germany",
"restrictPublicUsage":true,
"isInstance":true,
"maintenance_mode":false,
"show_admin_message":false,
"admin_message_title":"Message from the admin",
"admin_message":"Message from the admin text",
"admin_user":"admin_username",
"max_old_user_days": 60,
"donate_url": ""
}

290
youtube/channel.py Normal file
View File

@ -0,0 +1,290 @@
import base64
import json
import math
import re
import traceback
import urllib
import cachetools.func
import flask
import gevent
import youtube.proto as proto
from youtube import util, yt_data_extract
headers_desktop = (
('Accept', '*/*'),
('Accept-Language', 'en-US,en;q=0.5'),
('X-YouTube-Client-Name', '1'),
('X-YouTube-Client-Version', '2.20180830'),
) + util.desktop_ua
headers_mobile = (
('Accept', '*/*'),
('Accept-Language', 'en-US,en;q=0.5'),
('X-YouTube-Client-Name', '2'),
('X-YouTube-Client-Version', '2.20180830'),
) + util.mobile_ua
real_cookie = (('Cookie', 'VISITOR_INFO1_LIVE=8XihrAcN1l4'),)
generic_cookie = (('Cookie', 'VISITOR_INFO1_LIVE=ST1Ti53r4fU'),)
# SORT:
# videos:
# Popular - 1
# Oldest - 2
# Newest - 3
# playlists:
# Oldest - 2
# Newest - 3
# Last video added - 4
# view:
# grid: 0 or 1
# list: 2
def channel_ctoken_v3(channel_id, page, sort, tab, view=1):
# page > 1 doesn't work when sorting by oldest
offset = 30*(int(page) - 1)
page_token = proto.string(61, proto.unpadded_b64encode(
proto.string(1, proto.unpadded_b64encode(proto.uint(1,offset)))
))
tab = proto.string(2, tab )
sort = proto.uint(3, int(sort))
shelf_view = proto.uint(4, 0)
view = proto.uint(6, int(view))
continuation_info = proto.string(3,
proto.percent_b64encode(tab + sort + shelf_view + view + page_token)
)
channel_id = proto.string(2, channel_id )
pointless_nest = proto.string(80226972, channel_id + continuation_info)
return base64.urlsafe_b64encode(pointless_nest).decode('ascii')
def channel_ctoken_v2(channel_id, page, sort, tab, view=1):
# see https://github.com/iv-org/invidious/issues/1319#issuecomment-671732646
# page > 1 doesn't work when sorting by oldest
offset = 30*(int(page) - 1)
schema_number = {
3: 6307666885028338688,
2: 17254859483345278706,
1: 16570086088270825023,
}[int(sort)]
page_token = proto.string(61, proto.unpadded_b64encode(proto.string(1,
proto.uint(1, schema_number) + proto.string(2,
proto.string(1, proto.unpadded_b64encode(proto.uint(1,offset)))
)
)))
tab = proto.string(2, tab )
sort = proto.uint(3, int(sort))
#page = proto.string(15, str(page) )
shelf_view = proto.uint(4, 0)
view = proto.uint(6, int(view))
continuation_info = proto.string(3,
proto.percent_b64encode(tab + sort + shelf_view + view + page_token)
)
channel_id = proto.string(2, channel_id )
pointless_nest = proto.string(80226972, channel_id + continuation_info)
return base64.urlsafe_b64encode(pointless_nest).decode('ascii')
def channel_ctoken_v1(channel_id, page, sort, tab, view=1):
tab = proto.string(2, tab )
sort = proto.uint(3, int(sort))
page = proto.string(15, str(page) )
# example with shelves in videos tab: https://www.youtube.com/channel/UCNL1ZadSjHpjm4q9j2sVtOA/videos
shelf_view = proto.uint(4, 0)
view = proto.uint(6, int(view))
continuation_info = proto.string(3, proto.percent_b64encode(tab + view + sort + shelf_view + page + proto.uint(23, 0)) )
channel_id = proto.string(2, channel_id )
pointless_nest = proto.string(80226972, channel_id + continuation_info)
return base64.urlsafe_b64encode(pointless_nest).decode('ascii')
def get_channel_tab(channel_id, page="1", sort=3, tab='videos', view=1,
ctoken=None, print_status=True):
message = 'Got channel tab' if print_status else None
if not ctoken:
ctoken = channel_ctoken_v3(channel_id, page, sort, tab, view)
ctoken = ctoken.replace('=', '%3D')
# Not sure what the purpose of the key is or whether it will change
# For now it seems to be constant for the API endpoint, not dependent
# on the browsing session or channel
key = 'AIzaSyAO_FJ2SlqU8Q4STEHLGCilw_Y9_11qcW8'
url = 'https://www.youtube.com/youtubei/v1/browse?key=' + key
data = {
'context': {
'client': {
'hl': 'en',
'gl': 'US',
'clientName': 'WEB',
'clientVersion': '2.20180830',
},
},
'continuation': ctoken,
}
content_type_header = (('Content-Type', 'application/json'),)
content = util.fetch_url(
url, headers_desktop + content_type_header,
data=json.dumps(data), debug_name='channel_tab', report_text=message)
info = yt_data_extract.extract_channel_info(json.loads(content), tab)
if info['error'] is not None:
return False
post_process_channel_info(info)
return info
# cache entries expire after 30 minutes
@cachetools.func.ttl_cache(maxsize=128, ttl=30*60)
def get_number_of_videos_channel(channel_id):
if channel_id is None:
return 1000
# Uploads playlist
playlist_id = 'UU' + channel_id[2:]
url = 'https://m.youtube.com/playlist?list=' + playlist_id + '&pbj=1'
try:
response = util.fetch_url(url, headers_mobile,
debug_name='number_of_videos', report_text='Got number of videos')
except urllib.error.HTTPError as e:
traceback.print_exc()
print("Couldn't retrieve number of videos")
return 1000
response = response.decode('utf-8')
# match = re.search(r'"numVideosText":\s*{\s*"runs":\s*\[{"text":\s*"([\d,]*) videos"', response)
match = re.search(r'"numVideosText".*?([,\d]+)', response)
if match:
return int(match.group(1).replace(',',''))
else:
return 0
channel_id_re = re.compile(r'videos\.xml\?channel_id=([a-zA-Z0-9_-]{24})"')
@cachetools.func.lru_cache(maxsize=128)
def get_channel_id(base_url):
# method that gives the smallest possible response at ~4 kb
# needs to be as fast as possible
base_url = base_url.replace('https://www', 'https://m') # avoid redirect
response = util.fetch_url(base_url + '/about?pbj=1', headers_mobile,
debug_name='get_channel_id', report_text='Got channel id').decode('utf-8')
match = channel_id_re.search(response)
if match:
return match.group(1)
return None
def get_number_of_videos_general(base_url):
return get_number_of_videos_channel(get_channel_id(base_url))
def get_channel_search_json(channel_id, query, page):
offset = proto.unpadded_b64encode(proto.uint(3, (page-1)*30))
params = proto.string(2, 'search') + proto.string(15, offset)
params = proto.percent_b64encode(params)
ctoken = proto.string(2, channel_id) + proto.string(3, params) + proto.string(11, query)
ctoken = base64.urlsafe_b64encode(proto.nested(80226972, ctoken)).decode('ascii')
key = 'AIzaSyAO_FJ2SlqU8Q4STEHLGCilw_Y9_11qcW8'
url = 'https://www.youtube.com/youtubei/v1/browse?key=' + key
data = {
'context': {
'client': {
'hl': 'en',
'gl': 'US',
'clientName': 'WEB',
'clientVersion': '2.20180830',
},
},
'continuation': ctoken,
}
content_type_header = (('Content-Type', 'application/json'),)
polymer_json = util.fetch_url(
url, headers_desktop + content_type_header,
data=json.dumps(data), debug_name='channel_search')
return polymer_json
def post_process_channel_info(info):
info['avatar'] = util.prefix_url(info['avatar'])
info['channel_url'] = util.prefix_url(info['channel_url'])
for item in info['items']:
util.prefix_urls(item)
util.add_extra_html_info(item)
playlist_sort_codes = {'2': "da", '3': "dd", '4': "lad"}
# youtube.com/[channel_id]/[tab]
# youtube.com/user/[username]/[tab]
# youtube.com/c/[custom]/[tab]
# youtube.com/[custom]/[tab]
def get_channel_page_general_url(base_url, tab, request, channel_id=None):
page_number = int(request.args.get('page', 1))
sort = request.args.get('sort', '3')
view = request.args.get('view', '1')
query = request.args.get('query', '')
if tab == 'videos' and channel_id:
tasks = (
gevent.spawn(get_number_of_videos_channel, channel_id),
gevent.spawn(get_channel_tab, channel_id, page_number, sort, 'videos', view)
)
gevent.joinall(tasks)
util.check_gevent_exceptions(*tasks)
number_of_videos, polymer_json = tasks[0].value, tasks[1].value
elif tab == 'videos':
tasks = (
gevent.spawn(get_number_of_videos_general, base_url),
gevent.spawn(util.fetch_url, base_url + '/videos?pbj=1&view=0', headers_desktop, debug_name='gen_channel_videos')
)
gevent.joinall(tasks)
util.check_gevent_exceptions(*tasks)
number_of_videos, polymer_json = tasks[0].value, tasks[1].value
elif tab == 'about':
polymer_json = util.fetch_url(base_url + '/about?pbj=1', headers_desktop, debug_name='gen_channel_about')
elif tab == 'playlists':
polymer_json = util.fetch_url(base_url+ '/playlists?pbj=1&view=1&sort=' + playlist_sort_codes[sort], headers_desktop, debug_name='gen_channel_playlists')
elif tab == 'search' and channel_id:
polymer_json = get_channel_search_json(channel_id, query, page_number)
elif tab == 'search':
url = base_url + '/search?pbj=1&query=' + urllib.parse.quote(query, safe='')
polymer_json = util.fetch_url(url, headers_desktop, debug_name='gen_channel_search')
else:
flask.abort(404, 'Unknown channel tab: ' + tab)
info = yt_data_extract.extract_channel_info(json.loads(polymer_json), tab)
if info['error'] is not None:
return flask.render_template('error.html', error_message = info['error'])
post_process_channel_info(info)
if tab == 'videos':
info['number_of_videos'] = number_of_videos
info['number_of_pages'] = math.ceil(number_of_videos/30)
info['header_playlist_names'] = local_playlist.get_playlist_names()
if tab in ('videos', 'playlists'):
info['current_sort'] = sort
elif tab == 'search':
info['search_box_value'] = query
info['header_playlist_names'] = local_playlist.get_playlist_names()
info['page_number'] = page_number
info['subscribed'] = subscriptions.is_subscribed(info['channel_id'])
return flask.render_template('channel.html',
parameters_dictionary = request.args,
**info
)

213
youtube/channels.py Normal file
View File

@ -0,0 +1,213 @@
from youtube import proto
from flask import Markup as mk
import requests
import base64
import json
import re
# From: https://github.com/user234683/youtube-local/blob/master/youtube/channel.py
# SORT:
# videos:
# Popular - 1
# Oldest - 2
# Newest - 3
# playlists:
# Oldest - 2
# Newest - 3
# Last video added - 4
# view:
# grid: 0 or 1
# list: 2
headers = {
'Host': 'www.youtube.com',
'User-Agent': 'Mozilla/5.0 (Windows NT 6.1; Win64; x64)',
'Accept': '*/*',
'Accept-Language': 'en-US,en;q=0.5',
'X-YouTube-Client-Name': '1',
'X-YouTube-Client-Version': '2.20180418',
}
real_cookie = (('Cookie', 'VISITOR_INFO1_LIVE=8XihrAcN1l4'),)
generic_cookie = (('Cookie', 'VISITOR_INFO1_LIVE=ST1Ti53r4fU'),)
def channel_ctoken_desktop(channel_id, page, sort, tab, view=1):
# see https://github.com/iv-org/invidious/issues/1319#issuecomment-671732646
# page > 1 doesn't work when sorting by oldest
offset = 30*(int(page) - 1)
schema_number = {
3: 6307666885028338688,
2: 17254859483345278706,
1: 16570086088270825023,
}[int(sort)]
page_token = proto.string(61, proto.unpadded_b64encode(proto.string(1,
proto.uint(1, schema_number) + proto.string(2,
proto.string(1, proto.unpadded_b64encode(proto.uint(1,offset)))
)
)))
tab = proto.string(2, tab )
sort = proto.uint(3, int(sort))
#page = proto.string(15, str(page) )
shelf_view = proto.uint(4, 0)
view = proto.uint(6, int(view))
continuation_info = proto.string(3,
proto.percent_b64encode(tab + sort + shelf_view + view + page_token)
)
channel_id = proto.string(2, channel_id )
pointless_nest = proto.string(80226972, channel_id + continuation_info)
return base64.urlsafe_b64encode(pointless_nest).decode('ascii')
def channel_ctoken_mobile(channel_id, page, sort, tab, view=1):
tab = proto.string(2, tab )
sort = proto.uint(3, int(sort))
page = proto.string(15, str(page) )
# example with shelves in videos tab: https://www.youtube.com/channel/UCNL1ZadSjHpjm4q9j2sVtOA/videos
shelf_view = proto.uint(4, 0)
view = proto.uint(6, int(view))
continuation_info = proto.string( 3, proto.percent_b64encode(tab + view + sort + shelf_view + page) )
channel_id = proto.string(2, channel_id )
pointless_nest = proto.string(80226972, channel_id + continuation_info)
return base64.urlsafe_b64encode(pointless_nest).decode('ascii')
def id_or_username(string):
cidRegex = "^UC.{22}$"
if re.match(cidRegex, string):
return "channel"
else:
return "user"
def get_channel_videos_tab(content):
tabs = content['contents']['twoColumnBrowseResultsRenderer']['tabs']
for tab in tabs:
if tab['title'] != "Videos":
continue
else:
return tab
def get_video_items_from_tab(tab):
items = []
for item in tab:
try:
if item['gridVideoRenderer']:
items.append(item)
else:
continue
except KeyError:
continue
return items
def get_info_grid_video_item(item, channel=None):
item = item['gridVideoRenderer']
thumbnailOverlays = item['thumbnailOverlays']
published = ""
views = ""
isLive = False
isUpcoming = False
try:
if 'UPCOMING' in str(thumbnailOverlays):
start_time = item['upcomingEventData']['startTime']
isUpcoming = True
views = "-"
published = "Scheduled"
except KeyError:
isUpcoming = False
try:
if 'LIVE' in str(thumbnailOverlays):
isLive = True
try:
views = item['viewCountText']['simpleText']
except:
views = "Live"
try:
duration = item['lengthText']['simpleText']
except:
duration = "-"
if published != "Scheduled":
try:
published = item['publishedTimeText']['simpleText']
except KeyError:
published = "None"
except KeyError:
isUpcoming = False
isLive = False
if not isUpcoming and not isLive:
views = item['viewCountText']['simpleText']
published = item['publishedTimeText']['simpleText']
try:
duration = item['lengthText']['simpleText']
except:
duration = "?"
video = {
'videoTitle':item['title']['runs'][0]['text'],
'description':"",
'views':views,
'timeStamp':published,
'duration':duration,
'channelName':channel['username'],
'authorUrl':f"/channel/{channel['channelId']}",
'channelId':channel['channelId'],
'id':item['videoId'],
'videoUrl':f"/watch?v={item['videoId']}",
'isLive':isLive,
'isUpcoming':isUpcoming,
'videoThumb':item['thumbnail']['thumbnails'][0]['url'],
}
return video
def get_author_info_from_channel(content):
hmd = content['metadata']['channelMetadataRenderer']
cmd = content['header']['c4TabbedHeaderRenderer']
description = mk(hmd['description'])
channel = {
"channelId": cmd['channelId'],
"username": cmd['title'],
"thumbnail": f"https:{cmd['avatar']['thumbnails'][0]['url'].replace('/', '~')}",
"description":description,
"suscribers": cmd['subscriberCountText']['runs'][0]['text'].split(" ")[0],
"banner": cmd['banner']['thumbnails'][0]['url'],
}
return channel
def get_channel_info(channelId, videos=True, page=1, sort=3):
if id_or_username(channelId) == "channel":
videos = []
ciUrl = f"https://www.youtube.com/channel/{channelId}"
mainUrl = f"https://www.youtube.com/browse_ajax?ctoken={channel_ctoken_desktop(channelId, page, sort, 'videos')}"
content = json.loads(requests.get(mainUrl, headers=headers).text)
req = requests.get(ciUrl, headers=headers).text
start = (
req.index('window["ytInitialData"]')
+ len('window["ytInitialData"]')
+ 3
)
end = req.index("};", start) + 1
jsonIni = req[start:end]
data = json.loads(jsonIni)
#videosTab = get_channel_videos_tab(content)
authorInfo = get_author_info_from_channel(data)
if videos:
gridVideoItemList = get_video_items_from_tab(content[1]['response']['continuationContents']['gridContinuation']['items'])
for video in gridVideoItemList:
vid = get_info_grid_video_item(video, authorInfo)
videos.append(vid)
print({"channel":authorInfo, "videos":videos})
return {"channel":authorInfo, "videos":videos}
else:
return {"channel":authorInfo}
else:
baseUrl = f"https://www.youtube.com/user/{channelId}"

145
youtube/comments.py Normal file
View File

@ -0,0 +1,145 @@
import base64
import json
from youtube import proto, util, yt_data_extract
from youtube.util import concat_or_none
# Here's what I know about the secret key (starting with ASJN_i)
# *The secret key definitely contains the following information (or perhaps the information is stored at youtube's servers):
# -Video id
# -Offset
# -Sort
# *If the video id or sort in the ctoken contradicts the ASJN, the response is an error. The offset encoded outside the ASJN is ignored entirely.
# *The ASJN is base64 encoded data, indicated by the fact that the character after "ASJN_i" is one of ("0", "1", "2", "3")
# *The encoded data is not valid protobuf
# *The encoded data (after the 5 or so bytes that are always the same) is indistinguishable from random data according to a battery of randomness tests
# *The ASJN in the ctoken provided by a response changes in regular intervals of about a second or two.
# *Old ASJN's continue to work, and start at the same comment even if new comments have been posted since
# *The ASJN has no relation with any of the data in the response it came from
def make_comment_ctoken(video_id, sort=0, offset=0, lc='', secret_key=''):
video_id = proto.as_bytes(video_id)
secret_key = proto.as_bytes(secret_key)
page_info = proto.string(4,video_id) + proto.uint(6, sort)
offset_information = proto.nested(4, page_info) + proto.uint(5, offset)
if secret_key:
offset_information = proto.string(1, secret_key) + offset_information
page_params = proto.string(2, video_id)
if lc:
page_params += proto.string(6, proto.percent_b64encode(proto.string(15, lc)))
result = proto.nested(2, page_params) + proto.uint(3,6) + proto.nested(6, offset_information)
return base64.urlsafe_b64encode(result).decode('ascii')
def comment_replies_ctoken(video_id, comment_id, max_results=500):
params = proto.string(2, comment_id) + proto.uint(9, max_results)
params = proto.nested(3, params)
result = proto.nested(2, proto.string(2, video_id)) + proto.uint(3,6) + proto.nested(6, params)
return base64.urlsafe_b64encode(result).decode('ascii')
mobile_headers = {
'User-Agent': 'Mozilla/5.0 (iPhone; CPU iPhone OS 10_3_1 like Mac OS X) AppleWebKit/603.1.30 (KHTML, like Gecko) Version/10.0 Mobile/14E304 Safari/602.1',
'Accept': '*/*',
'Accept-Language': 'en-US,en;q=0.5',
'X-YouTube-Client-Name': '2',
'X-YouTube-Client-Version': '2.20180823',
}
def request_comments(ctoken, replies=False):
if replies: # let's make it use different urls for no reason despite all the data being encoded
base_url = "https://m.youtube.com/watch_comment?action_get_comment_replies=1&ctoken="
else:
base_url = "https://m.youtube.com/watch_comment?action_get_comments=1&ctoken="
url = base_url + ctoken.replace("=", "%3D") + "&pbj=1"
for i in range(0,8): # don't retry more than 8 times
content = util.fetch_url(url, headers=mobile_headers, report_text="Retrieved comments", debug_name='request_comments')
if content[0:4] == b")]}'": # random closing characters included at beginning of response for some reason
content = content[4:]
elif content[0:10] == b'\n<!DOCTYPE': # occasionally returns html instead of json for no reason
content = b''
print("got <!DOCTYPE>, retrying")
continue
break
polymer_json = json.loads(util.uppercase_escape(content.decode('utf-8')))
return polymer_json
def single_comment_ctoken(video_id, comment_id):
page_params = proto.string(2, video_id) + proto.string(6, proto.percent_b64encode(proto.string(15, comment_id)))
result = proto.nested(2, page_params) + proto.uint(3,6)
return base64.urlsafe_b64encode(result).decode('ascii')
def post_process_comments_info(comments_info):
for comment in comments_info['comments']:
comment['author_url'] = concat_or_none(
util.URL_ORIGIN, comment['author_url'])
comment['author_avatar'] = concat_or_none(
'/', comment['author_avatar'])
comment['permalink'] = concat_or_none(util.URL_ORIGIN, '/watch?v=',
comments_info['video_id'], '&lc=', comment['id'])
reply_count = comment['reply_count']
if reply_count == 0:
comment['replies_url'] = concat_or_none(util.URL_ORIGIN,
'/post_comment?parent_id=', comment['id'],
'&video_id=', comments_info['video_id'])
else:
comment['replies_url'] = concat_or_none(util.URL_ORIGIN,
'/comments?parent_id=', comment['id'],
'&video_id=', comments_info['video_id'])
if reply_count == 0:
comment['view_replies_text'] = 'Reply'
elif reply_count == 1:
comment['view_replies_text'] = '1 reply'
else:
comment['view_replies_text'] = str(reply_count) + ' replies'
if comment['like_count'] == 1:
comment['likes_text'] = '1 like'
else:
comment['likes_text'] = str(comment['like_count']) + ' likes'
if comments_info['ctoken']:
comments_info['more_comments_url'] = concat_or_none(util.URL_ORIGIN,
'/comments?ctoken=', comments_info['ctoken'])
comments_info['page_number'] = page_number = str(int(comments_info['offset']/20) + 1)
if not comments_info['is_replies']:
comments_info['sort_text'] = 'top' if comments_info['sort'] == 0 else 'newest'
comments_info['video_url'] = concat_or_none(util.URL_ORIGIN,
'/watch?v=', comments_info['video_id'])
comments_info['video_thumbnail'] = concat_or_none('/i.ytimg.com/vi/',
comments_info['video_id'], '/mqdefault.jpg')
def video_comments(video_id, sort=0, offset=0, lc='', secret_key=''):
comments_info = yt_data_extract.extract_comments_info(request_comments(make_comment_ctoken(video_id, sort, offset, lc, secret_key)))
post_process_comments_info(comments_info)
post_comment_url = util.URL_ORIGIN + "/post_comment?video_id=" + video_id
other_sort_url = util.URL_ORIGIN + '/comments?ctoken=' + make_comment_ctoken(video_id, sort=1 - sort, lc=lc)
other_sort_text = 'Sort by ' + ('newest' if sort == 0 else 'top')
comments_info['comment_links'] = [('Post comment', post_comment_url), (other_sort_text, other_sort_url)]
return comments_info
return {}

11
youtube/opensearch.xml Normal file
View File

@ -0,0 +1,11 @@
<SearchPlugin xmlns="http://www.mozilla.org/2006/browser/search/">
<ShortName>Youtube local</ShortName>
<Description>no CIA shit in the background</Description>
<InputEncoding>UTF-8</InputEncoding>
<Image width="16" height="16">data:image/x-icon;base64,AAABAAEAEBAAAAEACAAlAgAAFgAAAIlQTkcNChoKAAAADUlIRFIAAAAQAAAAEAgGAAAAH/P/YQAAAexJREFUOI2lkzFPmlEUhp/73fshtCUCRtvQkJoKMrDQJvoHnBzUhc3EH0DUQf+As6tujo4M6mTiIDp0kGiMTRojTRNSW6o12iD4YYXv3g7Qr4O0ScM7npz7vOe+J0fk83lDF7K6eQygwkdHhI+P0bYNxmBXq5RmZui5vGQgn0f7fKi7O4oLC1gPD48BP9JpnpRKJFZXcQMB3m1u4vr9NHp76d/bo39/n4/z84ROThBa4/r91OJxMKb9BSn5mskAIOt1eq6uEFpjVyrEcjk+T0+TXlzkbTZLuFDAur9/nIFRipuREQCe7+zgBgK8mZvj/fIylVTKa/6UzXKbSnnuHkA0GnwbH/cA0a0takND3IyOEiwWAXBiMYTWjzLwtvB9bAyAwMUF8ZUVPiwtYTWbHqA6PIxoNv8OMLbN3eBga9TZWYQxaKX+AJJJhOv+AyAlT0slAG6TSX5n8+zszJugkzxA4PzcK9YSCQCk42DXaq1aGwqgfT5ebG9jpMQyUjKwu8vrtbWWqxC83NjAd31NsO2uleJnX58HCJ6eEjk8BGNQAA+RCOXJScpTU2AMwnUxlkXk4ACA+2iUSKGArNeRjkMsl6M8MYHQGtHpmIxSvFpfRzoORinQGqvZBCEwQoAxfMlkaIRCnQH/o66v8Re19MavaDNLfgAAAABJRU5ErkJggg==</Image>
<Url type="text/html" method="GET" template="http://localhost:$port_number/youtube.com/search">
<Param name="query" value="{searchTerms}"/>
</Url>
<SearchForm>http://localhost:$port_number/youtube.com/search</SearchForm>
</SearchPlugin>

123
youtube/playlist.py Normal file
View File

@ -0,0 +1,123 @@
from youtube import util, yt_data_extract, proto, local_playlist
from youtube import yt_app
import base64
import urllib
import json
import string
import gevent
import math
from flask import request
import flask
def playlist_ctoken(playlist_id, offset):
offset = proto.uint(1, offset)
# this is just obfuscation as far as I can tell. It doesn't even follow protobuf
offset = b'PT:' + proto.unpadded_b64encode(offset)
offset = proto.string(15, offset)
continuation_info = proto.string( 3, proto.percent_b64encode(offset) )
playlist_id = proto.string(2, 'VL' + playlist_id )
pointless_nest = proto.string(80226972, playlist_id + continuation_info)
return base64.urlsafe_b64encode(pointless_nest).decode('ascii')
# initial request types:
# polymer_json: https://m.youtube.com/playlist?list=PLv3TTBr1W_9tppikBxAE_G6qjWdBljBHJ&pbj=1&lact=0
# ajax json: https://m.youtube.com/playlist?list=PLv3TTBr1W_9tppikBxAE_G6qjWdBljBHJ&pbj=1&lact=0 with header X-YouTube-Client-Version: 1.20180418
# continuation request types:
# polymer_json: https://m.youtube.com/playlist?&ctoken=[...]&pbj=1
# ajax json: https://m.youtube.com/playlist?action_continuation=1&ajax=1&ctoken=[...]
headers_1 = (
('Accept', '*/*'),
('Accept-Language', 'en-US,en;q=0.5'),
('X-YouTube-Client-Name', '2'),
('X-YouTube-Client-Version', '2.20180614'),
)
def playlist_first_page(playlist_id, report_text = "Retrieved playlist"):
url = 'https://m.youtube.com/playlist?list=' + playlist_id + '&pbj=1'
content = util.fetch_url(url, util.mobile_ua + headers_1, report_text=report_text, debug_name='playlist_first_page')
content = json.loads(util.uppercase_escape(content.decode('utf-8')))
return content
#https://m.youtube.com/playlist?itct=CBMQybcCIhMIptj9xJaJ2wIV2JKcCh3Idwu-&ctoken=4qmFsgI2EiRWTFBMT3kwajlBdmxWWlB0bzZJa2pLZnB1MFNjeC0tN1BHVEMaDmVnWlFWRHBEUWxFJTNE&pbj=1
def get_videos(playlist_id, page):
url = "https://m.youtube.com/playlist?ctoken=" + playlist_ctoken(playlist_id, (int(page)-1)*20) + "&pbj=1"
headers = {
'User-Agent': ' Mozilla/5.0 (iPhone; CPU iPhone OS 10_3_1 like Mac OS X) AppleWebKit/603.1.30 (KHTML, like Gecko) Version/10.0 Mobile/14E304 Safari/602.1',
'Accept': '*/*',
'Accept-Language': 'en-US,en;q=0.5',
'X-YouTube-Client-Name': '2',
'X-YouTube-Client-Version': '2.20180508',
}
content = util.fetch_url(url, headers, report_text="Retrieved playlist", debug_name='playlist_videos')
info = json.loads(util.uppercase_escape(content.decode('utf-8')))
return info
@yt_app.route('/playlist')
def get_playlist_page():
if 'list' not in request.args:
abort(400)
playlist_id = request.args.get('list')
page = request.args.get('page', '1')
if page == '1':
first_page_json = playlist_first_page(playlist_id)
this_page_json = first_page_json
else:
tasks = (
gevent.spawn(playlist_first_page, playlist_id, report_text="Retrieved playlist info" ),
gevent.spawn(get_videos, playlist_id, page)
)
gevent.joinall(tasks)
util.check_gevent_exceptions(*tasks)
first_page_json, this_page_json = tasks[0].value, tasks[1].value
info = yt_data_extract.extract_playlist_info(this_page_json)
if info['error']:
return flask.render_template('error.html', error_message = info['error'])
if page != '1':
info['metadata'] = yt_data_extract.extract_playlist_metadata(first_page_json)
util.prefix_urls(info['metadata'])
for item in info.get('items', ()):
util.prefix_urls(item)
util.add_extra_html_info(item)
if 'id' in item:
item['thumbnail'] = '/https://i.ytimg.com/vi/' + item['id'] + '/default.jpg'
item['url'] += '&list=' + playlist_id
if item['index']:
item['url'] += '&index=' + str(item['index'])
video_count = yt_data_extract.deep_get(info, 'metadata', 'video_count')
if video_count is None:
video_count = 40
return flask.render_template('playlist.html',
header_playlist_names = local_playlist.get_playlist_names(),
video_list = info.get('items', []),
num_pages = math.ceil(video_count/20),
parameters_dictionary = request.args,
**info['metadata']
).encode('utf-8')

129
youtube/proto.py Normal file
View File

@ -0,0 +1,129 @@
from math import ceil
import base64
import io
def byte(n):
return bytes((n,))
def varint_encode(offset):
'''In this encoding system, for each 8-bit byte, the first bit is 1 if there are more bytes, and 0 is this is the last one.
The next 7 bits are data. These 7-bit sections represent the data in Little endian order. For example, suppose the data is
aaaaaaabbbbbbbccccccc (each of these sections is 7 bits). It will be encoded as:
1ccccccc 1bbbbbbb 0aaaaaaa
This encoding is used in youtube parameters to encode offsets and to encode the length for length-prefixed data.
See https://developers.google.com/protocol-buffers/docs/encoding#varints for more info.'''
needed_bytes = ceil(offset.bit_length()/7) or 1 # (0).bit_length() returns 0, but we need 1 in that case.
encoded_bytes = bytearray(needed_bytes)
for i in range(0, needed_bytes - 1):
encoded_bytes[i] = (offset & 127) | 128 # 7 least significant bits
offset = offset >> 7
encoded_bytes[-1] = offset & 127 # leave first bit as zero for last byte
return bytes(encoded_bytes)
def varint_decode(encoded):
decoded = 0
for i, byte in enumerate(encoded):
decoded |= (byte & 127) << 7*i
if not (byte & 128):
break
return decoded
def string(field_number, data):
data = as_bytes(data)
return _proto_field(2, field_number, varint_encode(len(data)) + data)
nested = string
def uint(field_number, value):
return _proto_field(0, field_number, varint_encode(value))
def _proto_field(wire_type, field_number, data):
''' See https://developers.google.com/protocol-buffers/docs/encoding#structure '''
return varint_encode( (field_number << 3) | wire_type) + data
def percent_b64encode(data):
return base64.urlsafe_b64encode(data).replace(b'=', b'%3D')
def unpadded_b64encode(data):
return base64.urlsafe_b64encode(data).replace(b'=', b'')
def as_bytes(value):
if isinstance(value, str):
return value.encode('utf-8')
return value
def read_varint(data):
result = 0
i = 0
while True:
try:
byte = data.read(1)[0]
except IndexError:
if i == 0:
raise EOFError()
raise Exception('Unterminated varint starting at ' + str(data.tell() - i))
result |= (byte & 127) << 7*i
if not byte & 128:
break
i += 1
return result
def read_group(data, end_sequence):
start = data.tell()
index = data.original.find(end_sequence, start)
if index == -1:
raise Exception('Unterminated group')
data.seek(index + len(end_sequence))
return data.original[start:index]
def read_protobuf(data):
data_original = data
data = io.BytesIO(data)
data.original = data_original
while True:
try:
tag = read_varint(data)
except EOFError:
break
wire_type = tag & 7
field_number = tag >> 3
if wire_type == 0:
value = read_varint(data)
elif wire_type == 1:
value = data.read(8)
elif wire_type == 2:
length = read_varint(data)
value = data.read(length)
elif wire_type == 3:
end_bytes = encode_varint((field_number << 3) | 4)
value = read_group(data, end_bytes)
elif wire_type == 5:
value = data.read(4)
else:
raise Exception("Unknown wire type: " + str(wire_type) + ", Tag: " + bytes_to_hex(succinct_encode(tag)) + ", at position " + str(data.tell()))
yield (wire_type, field_number, value)
def parse(data):
return {field_number: value for _, field_number, value in read_protobuf(data)}
def b64_to_bytes(data):
if isinstance(data, bytes):
data = data.decode('ascii')
data = data.replace("%3D", "=")
return base64.urlsafe_b64decode(data + "="*((4 - len(data)%4)%4) )

167
youtube/search.py Normal file
View File

@ -0,0 +1,167 @@
from youtube import proto
from youtube import utils
from flask import Markup
import urllib.parse
import requests
import base64
import json
def page_number_to_sp_parameter(page, autocorrect, sort, filters):
offset = (int(page) - 1)*20 # 20 results per page
autocorrect = proto.nested(8, proto.uint(1, 1 - int(autocorrect) ))
filters_enc = proto.nested(2, proto.uint(1, filters['time']) + proto.uint(2, filters['type']) + proto.uint(3, filters['duration']))
result = proto.uint(1, sort) + filters_enc + autocorrect + proto.uint(9, offset) + proto.string(61, b'')
return base64.urlsafe_b64encode(result).decode('ascii')
def search_by_terms(search_terms, page, autocorrect, sort, filters):
url = "https://www.youtube.com/results?search_query=" + urllib.parse.quote_plus(search_terms)
headers = {
'Host': 'www.youtube.com',
'User-Agent': 'Mozilla/5.0 (Windows NT 6.1; Win64; x64)',
'Accept': '*/*',
'Accept-Language': 'en-US,en;q=0.5',
'X-YouTube-Client-Name': '1',
'X-YouTube-Client-Version': '2.20180418',
}
url += "&pbj=1&sp=" + page_number_to_sp_parameter(page, autocorrect, sort, filters).replace("=", "%3D")
content = requests.get(url, headers=headers).text
info = json.loads(content)
videos = get_videos_from_search(info)
channels = get_channels_from_search(info)
results = {
"videos": videos,
"channels": channels
}
return results
def get_channels_from_search(search):
results = []
search = search[1]['response']
primaryContents = search['contents']['twoColumnSearchResultsRenderer']['primaryContents']
contents = primaryContents['sectionListRenderer']['contents']
for content in contents:
try:
items = content['itemSectionRenderer']['contents']
except:
continue
for item in items:
try:
item['channelRenderer']
channel = get_channel_renderer_item_info(item['channelRenderer'])
results.append(channel)
except KeyError:
continue
return results
def get_channel_renderer_item_info(item):
try:
suscribers = item['subscriberCountText']['simpleText'].split(" ")[0]
except:
suscribers = "?"
try:
description = utils.get_description_snippet_text(item['descriptionSnippet']['runs'])
except KeyError:
description = ""
try:
channel = {
"channelId": item['channelId'],
"username": item['title']['simpleText'],
"thumbnail": "https:{}".format(item['thumbnail']['thumbnails'][0]['url'].replace("/", "~")),
"description": Markup(str(description)),
"suscribers": suscribers,
"videos": item['videoCountText']['runs'][0]['text']
}
except KeyError:
channel = {
"channelId": item['channelId'],
"username": item['title']['simpleText'],
"avatar": item['thumbnail']['thumbnails'][0]['url'],
"suscribers": suscribers
}
return channel
def get_videos_from_search(search):
latest = []
results = []
search = search[1]['response']
primaryContents = search['contents']['twoColumnSearchResultsRenderer']['primaryContents']
contents = primaryContents['sectionListRenderer']['contents']
for content in contents:
try:
items = content['itemSectionRenderer']['contents']
except:
continue
for item in items:
try:
item['videoRenderer']
video = get_video_renderer_item_info(item['videoRenderer'])
results.append(video)
except KeyError:
continue
# Sometimes Youtube will return an empty query. Try again.
return results
def get_video_renderer_item_info(item):
published = ""
views = ""
isLive = False
isUpcoming = False
thumbnailOverlays = item['thumbnailOverlays']
try:
if 'UPCOMING' in str(thumbnailOverlays):
start_time = item['upcomingEventData']['startTime']
isUpcoming = True
views = "-"
published = "Scheduled"
except KeyError:
isUpcoming = False
try:
if 'LIVE' in str(thumbnailOverlays):
isLive = True
try:
views = item['viewCountText']['simpleText']
except:
views = "Live"
try:
duration = item['lengthText']['simpleText']
except:
duration = "-"
if published != "Scheduled":
try:
published = item['publishedTimeText']['simpleText']
except KeyError:
published = "None"
except:
isUpcoming = False
isLive = False
if not isUpcoming and not isLive:
views = item['viewCountText']['simpleText']
published = item['publishedTimeText']['simpleText']
duration = item['lengthText']['simpleText']
video = {
'videoTitle':item['title']['runs'][0]['text'],
'description':Markup(str(utils.get_description_snippet_text(item['descriptionSnippet']['runs']))),
'views':views,
'timeStamp':published,
'duration':duration,
'channelName':item['ownerText']['runs'][0]['text'],
'authorUrl':"/channel/{}".format(item['ownerText']['runs'][0]['navigationEndpoint']['browseEndpoint']['browseId']),
'channelId':item['ownerText']['runs'][0]['navigationEndpoint']['browseEndpoint']['browseId'],
'id':item['videoId'],
'videoUrl':f"/watch?v={item['videoId']}",
'isLive':isLive,
'isUpcoming':isUpcoming,
'videoThumb':item['thumbnail']['thumbnails'][0]['url'],
}
return video

396
youtube/util.py Normal file
View File

@ -0,0 +1,396 @@
import gzip
from youtube import yt_data_extract
try:
import brotli
have_brotli = True
except ImportError:
have_brotli = False
import urllib.parse
import re
import time
import os
import json
import gevent
import gevent.queue
import gevent.lock
# The trouble with the requests library: It ships its own certificate bundle via certifi
# instead of using the system certificate store, meaning self-signed certificates
# configured by the user will not work. Some draconian networks block TLS unless a corporate
# certificate is installed on the system. Additionally, some users install a self signed cert
# in order to use programs to modify or monitor requests made by programs on the system.
# Finally, certificates expire and need to be updated, or are sometimes revoked. Sometimes
# certificate authorites go rogue and need to be untrusted. Since we are going through Tor exit nodes,
# this becomes all the more important. A rogue CA could issue a fake certificate for accounts.google.com, and a
# malicious exit node could use this to decrypt traffic when logging in and retrieve passwords. Examples:
# https://www.engadget.com/2015/10/29/google-warns-symantec-over-certificates/
# https://nakedsecurity.sophos.com/2013/12/09/serious-security-google-finds-fake-but-trusted-ssl-certificates-for-its-domains-made-in-france/
# In the requests documentation it says:
# "Before version 2.16, Requests bundled a set of root CAs that it trusted, sourced from the Mozilla trust store.
# The certificates were only updated once for each Requests version. When certifi was not installed,
# this led to extremely out-of-date certificate bundles when using significantly older versions of Requests.
# For the sake of security we recommend upgrading certifi frequently!"
# (http://docs.python-requests.org/en/master/user/advanced/#ca-certificates)
# Expecting users to remember to manually update certifi on Linux isn't reasonable in my view.
# On windows, this is even worse since I am distributing all dependencies. This program is not
# updated frequently, and using requests would lead to outdated certificates. Certificates
# should be updated with OS updates, instead of thousands of developers of different programs
# being expected to do this correctly 100% of the time.
# There is hope that this might be fixed eventually:
# https://github.com/kennethreitz/requests/issues/2966
# Until then, I will use a mix of urllib3 and urllib.
import urllib3
import urllib3.contrib.socks
URL_ORIGIN = "/https://www.youtube.com"
connection_pool = urllib3.PoolManager(cert_reqs = 'CERT_REQUIRED')
def get_pool(use_tor):
return connection_pool
class HTTPAsymmetricCookieProcessor(urllib.request.BaseHandler):
'''Separate cookiejars for receiving and sending'''
def __init__(self, cookiejar_send=None, cookiejar_receive=None):
self.cookiejar_send = cookiejar_send
self.cookiejar_receive = cookiejar_receive
def http_request(self, request):
if self.cookiejar_send is not None:
self.cookiejar_send.add_cookie_header(request)
return request
def http_response(self, request, response):
if self.cookiejar_receive is not None:
self.cookiejar_receive.extract_cookies(response, request)
return response
https_request = http_request
https_response = http_response
class FetchError(Exception):
def __init__(self, code, reason='', ip=None):
Exception.__init__(self, 'HTTP error during request: ' + code + ' ' + reason)
self.code = code
self.reason = reason
self.ip = ip
def decode_content(content, encoding_header):
encodings = encoding_header.replace(' ', '').split(',')
for encoding in reversed(encodings):
if encoding == 'identity':
continue
if encoding == 'br':
content = brotli.decompress(content)
elif encoding == 'gzip':
content = gzip.decompress(content)
return content
def fetch_url_response(url, headers=(), timeout=15, data=None,
cookiejar_send=None, cookiejar_receive=None,
use_tor=True, max_redirects=None):
'''
returns response, cleanup_function
When cookiejar_send is set to a CookieJar object,
those cookies will be sent in the request (but cookies in response will not be merged into it)
When cookiejar_receive is set to a CookieJar object,
cookies received in the response will be merged into the object (nothing will be sent from it)
When both are set to the same object, cookies will be sent from the object,
and response cookies will be merged into it.
'''
headers = dict(headers) # Note: Calling dict() on a dict will make a copy
if have_brotli:
headers['Accept-Encoding'] = 'gzip, br'
else:
headers['Accept-Encoding'] = 'gzip'
# prevent python version being leaked by urllib if User-Agent isn't provided
# (urllib will use ex. Python-urllib/3.6 otherwise)
if 'User-Agent' not in headers and 'user-agent' not in headers and 'User-agent' not in headers:
headers['User-Agent'] = 'Python-urllib'
method = "GET"
if data is not None:
method = "POST"
if isinstance(data, str):
data = data.encode('utf-8')
elif not isinstance(data, bytes):
data = urllib.parse.urlencode(data).encode('utf-8')
if cookiejar_send is not None or cookiejar_receive is not None: # Use urllib
req = urllib.request.Request(url, data=data, headers=headers)
cookie_processor = HTTPAsymmetricCookieProcessor(cookiejar_send=cookiejar_send, cookiejar_receive=cookiejar_receive)
opener = urllib.request.build_opener(cookie_processor)
response = opener.open(req, timeout=timeout)
cleanup_func = (lambda r: None)
else: # Use a urllib3 pool. Cookies can't be used since urllib3 doesn't have easy support for them.
# default: Retry.DEFAULT = Retry(3)
# (in connectionpool.py in urllib3)
# According to the documentation for urlopen, a redirect counts as a
# retry. So there are 3 redirects max by default.
if max_redirects:
retries = urllib3.Retry(3+max_redirects, redirect=max_redirects)
else:
retries = urllib3.Retry(3)
pool = get_pool(use_tor)
response = pool.request(method, url, headers=headers, body=data,
timeout=timeout, preload_content=False,
decode_content=False, retries=retries)
cleanup_func = (lambda r: r.release_conn())
return response, cleanup_func
def fetch_url(url, headers=(), timeout=15, report_text=None, data=None,
cookiejar_send=None, cookiejar_receive=None, use_tor=True,
debug_name=None):
start_time = time.time()
response, cleanup_func = fetch_url_response(
url, headers, timeout=timeout, data=data,
cookiejar_send=cookiejar_send, cookiejar_receive=cookiejar_receive,
use_tor=use_tor)
response_time = time.time()
content = response.read()
read_finish = time.time()
cleanup_func(response) # release_connection for urllib3
if (response.status == 429
and content.startswith(b'<!DOCTYPE')
and b'Our systems have detected unusual traffic' in content):
ip = re.search(br'IP address: ((?:[\da-f]*:)+[\da-f]+|(?:\d+\.)+\d+)',
content)
ip = ip.group(1).decode('ascii') if ip else None
raise FetchError('429', reason=response.reason, ip=ip)
elif response.status >= 400:
raise FetchError(str(response.status), reason=response.reason, ip=None)
if report_text:
print(report_text, ' Latency:', round(response_time - start_time,3), ' Read time:', round(read_finish - response_time,3))
content = decode_content(content, response.getheader('Content-Encoding', default='identity'))
return content
def head(url, use_tor=False, report_text=None, max_redirects=10):
pool = get_pool(use_tor)
start_time = time.time()
# default: Retry.DEFAULT = Retry(3)
# (in connectionpool.py in urllib3)
# According to the documentation for urlopen, a redirect counts as a retry
# So there are 3 redirects max by default. Let's change that
# to 10 since googlevideo redirects a lot.
retries = urllib3.Retry(3+max_redirects, redirect=max_redirects,
raise_on_redirect=False)
headers = {'User-Agent': 'Python-urllib'}
response = pool.request('HEAD', url, headers=headers, retries=retries)
if report_text:
print(report_text, ' Latency:', round(time.time() - start_time,3))
return response
mobile_user_agent = 'Mozilla/5.0 (Linux; Android 7.0; Redmi Note 4 Build/NRD90M) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Mobile Safari/537.36'
mobile_ua = (('User-Agent', mobile_user_agent),)
desktop_user_agent = 'Mozilla/5.0 (Windows NT 6.1; rv:52.0) Gecko/20100101 Firefox/52.0'
desktop_ua = (('User-Agent', desktop_user_agent),)
class RateLimitedQueue(gevent.queue.Queue):
''' Does initial_burst (def. 30) at first, then alternates between waiting waiting_period (def. 5) seconds and doing subsequent_bursts (def. 10) queries. After 5 seconds with nothing left in the queue, resets rate limiting. '''
def __init__(self, initial_burst=30, waiting_period=5, subsequent_bursts=10):
self.initial_burst = initial_burst
self.waiting_period = waiting_period
self.subsequent_bursts = subsequent_bursts
self.count_since_last_wait = 0
self.surpassed_initial = False
self.lock = gevent.lock.BoundedSemaphore(1)
self.currently_empty = False
self.empty_start = 0
gevent.queue.Queue.__init__(self)
def get(self):
self.lock.acquire() # blocks if another greenlet currently has the lock
if self.count_since_last_wait >= self.subsequent_bursts and self.surpassed_initial:
gevent.sleep(self.waiting_period)
self.count_since_last_wait = 0
elif self.count_since_last_wait >= self.initial_burst and not self.surpassed_initial:
self.surpassed_initial = True
gevent.sleep(self.waiting_period)
self.count_since_last_wait = 0
self.count_since_last_wait += 1
if not self.currently_empty and self.empty():
self.currently_empty = True
self.empty_start = time.monotonic()
item = gevent.queue.Queue.get(self) # blocks when nothing left
if self.currently_empty:
if time.monotonic() - self.empty_start >= self.waiting_period:
self.count_since_last_wait = 0
self.surpassed_initial = False
self.currently_empty = False
self.lock.release()
return item
def download_thumbnail(save_directory, video_id):
url = "https://i.ytimg.com/vi/" + video_id + "/mqdefault.jpg"
save_location = os.path.join(save_directory, video_id + ".jpg")
try:
thumbnail = fetch_url(url, report_text="Saved thumbnail: " + video_id)
except urllib.error.HTTPError as e:
print("Failed to download thumbnail for " + video_id + ": " + str(e))
return False
try:
f = open(save_location, 'wb')
except FileNotFoundError:
os.makedirs(save_directory, exist_ok = True)
f = open(save_location, 'wb')
f.write(thumbnail)
f.close()
return True
def download_thumbnails(save_directory, ids):
if not isinstance(ids, (list, tuple)):
ids = list(ids)
# only do 5 at a time
# do the n where n is divisible by 5
i = -1
for i in range(0, int(len(ids)/5) - 1 ):
gevent.joinall([gevent.spawn(download_thumbnail, save_directory, ids[j]) for j in range(i*5, i*5 + 5)])
# do the remainders (< 5)
gevent.joinall([gevent.spawn(download_thumbnail, save_directory, ids[j]) for j in range(i*5 + 5, len(ids))])
def dict_add(*dicts):
for dictionary in dicts[1:]:
dicts[0].update(dictionary)
return dicts[0]
def video_id(url):
url_parts = urllib.parse.urlparse(url)
return urllib.parse.parse_qs(url_parts.query)['v'][0]
# default, sddefault, mqdefault, hqdefault, hq720
def get_thumbnail_url(video_id):
return "/i.ytimg.com/vi/" + video_id + "/mqdefault.jpg"
def seconds_to_timestamp(seconds):
seconds = int(seconds)
hours, seconds = divmod(seconds,3600)
minutes, seconds = divmod(seconds,60)
if hours != 0:
timestamp = str(hours) + ":"
timestamp += str(minutes).zfill(2) # zfill pads with zeros
else:
timestamp = str(minutes)
timestamp += ":" + str(seconds).zfill(2)
return timestamp
def update_query_string(query_string, items):
parameters = urllib.parse.parse_qs(query_string)
parameters.update(items)
return urllib.parse.urlencode(parameters, doseq=True)
def uppercase_escape(s):
return re.sub(
r'\\U([0-9a-fA-F]{8})',
lambda m: chr(int(m.group(1), base=16)), s)
def prefix_url(url):
if url is None:
return None
url = url.lstrip('/') # some urls have // before them, which has a special meaning
return '/' + url
def left_remove(string, substring):
'''removes substring from the start of string, if present'''
if string.startswith(substring):
return string[len(substring):]
return string
def concat_or_none(*strings):
'''Concatenates strings. Returns None if any of the arguments are None'''
result = ''
for string in strings:
if string is None:
return None
result += string
return result
def prefix_urls(item):
try:
item['thumbnail'] = prefix_url(item['thumbnail'])
except KeyError:
pass
try:
item['author_url'] = prefix_url(item['author_url'])
except KeyError:
pass
def add_extra_html_info(item):
if item['type'] == 'video':
item['url'] = (URL_ORIGIN + '/watch?v=' + item['id']) if item.get('id') else None
video_info = {}
for key in ('id', 'title', 'author', 'duration'):
try:
video_info[key] = item[key]
except KeyError:
video_info[key] = ''
item['video_info'] = json.dumps(video_info)
elif item['type'] == 'playlist':
item['url'] = (URL_ORIGIN + '/playlist?list=' + item['id']) if item.get('id') else None
elif item['type'] == 'channel':
item['url'] = (URL_ORIGIN + "/channel/" + item['id']) if item.get('id') else None
def parse_info_prepare_for_html(renderer, additional_info={}):
item = yt_data_extract.extract_item_info(renderer, additional_info)
prefix_urls(item)
add_extra_html_info(item)
return item
def check_gevent_exceptions(*tasks):
for task in tasks:
if task.exception:
raise task.exception

61
youtube/utils.py Normal file
View File

@ -0,0 +1,61 @@
import urllib
from flask import Markup
import bleach
def get_description_snippet_text(ds):
string = ""
for t in ds:
try:
if t['bold']:
text = "<b>"+t['text']+"</b>"
else:
text = t['text']
except:
text = t['text']
string = string + text
return string
def concat_texts(strings):
'''Concatenates strings. Returns None if any of the arguments are None'''
result = ''
for string in strings:
if string['text'] is None:
return None
result += string['text']
return result
def parse_comment(raw_comment):
cmnt = {}
imgHostName = urllib.parse.urlparse(raw_comment['author_avatar'][1:]).netloc
cmnt['author'] = raw_comment['author']
cmnt['thumbnail'] = raw_comment['author_avatar'].replace(f"https://{imgHostName}","")[1:] + "?host=" + imgHostName
print(cmnt['thumbnail'])
cmnt['channel'] = raw_comment['author_url']
cmnt['text'] = Markup(bleach.linkify(concat_texts(raw_comment['text']).replace("\n", "<br>")))
cmnt['date'] = raw_comment['time_published']
try:
cmnt['creatorHeart'] = raw_comment['creatorHeart']['creatorHeartRenderer']['creatorThumbnail']['thumbnails'][0][
'url']
except:
cmnt['creatorHeart'] = False
try:
cmnt['likes'] = raw_comment['like_count']
except:
cmnt['likes'] = 0
try:
cmnt['replies'] = raw_comment['reply_count']
except:
cmnt['replies'] = 0
return cmnt
def post_process_comments_info(comments_info):
comments = []
for comment in comments_info['comments']:
comments.append(parse_comment(comment))
return comments

Some files were not shown because too many files have changed in this diff Show More