830 Commits

Author SHA1 Message Date
James Taylor
2df4238924
Use new channel api endpoint now that browse_ajax is disabled
Fixes channel pages > 1

Signed-off-by: Jesús <heckyel@hyperbola.info>
2021-03-03 10:40:02 -05:00
James Taylor
c45f60d3f5
util.py: Encode data using utf-8, not ascii
Signed-off-by: Jesús <heckyel@hyperbola.info>
2021-03-03 10:36:32 -05:00
James Taylor
60a6ddc5ef
util.py: Fix data not being passed in requests
Signed-off-by: Jesús <heckyel@hyperbola.info>
2021-03-03 10:34:54 -05:00
James Taylor
f7ed8159cd
Channel: use general pbj=1 endpoint to get first page of videos
YouTube disabled the browse_ajax endpoint. Quick fix for first
channel page. In general, this will be more robust against api
endpoint changes. As YouTube continues to change api endpoints,
at least the subscriptions and first page will no longer break.

Signed-off-by: Jesús <heckyel@hyperbola.info>
2021-03-03 10:33:45 -05:00
2d9aca4b8b
General theme: fix footer center 2021-02-27 10:36:00 -05:00
65300003cd
Fix data comments 00ef1c862744ec00886bc3fa4b95fdfc6c151866 2021-02-26 13:16:01 -05:00
4a5b336deb
minor fix 2021-02-26 12:15:02 -05:00
James Taylor
1ec02199ea
Update max_replies when there's a continuation for the replies
Because of the new ctoken methodology for getting comment replies,
the more comments button automatically works inside the comment
reply thread when there are more replies than the limit (250).

This commit also updates the max_replies for that ctoken so the
next 250 replies will be retrieved for the more comments ctoken.

Signed-off-by: Jesús <heckyel@hyperbola.info>
2021-02-26 12:11:32 -05:00
James Taylor
3a73953e6c
proto_debug.py: Use new implementations from proto
And change base64u to base64p to match (u too easily confused
with "unpadded")

Signed-off-by: Jesús <heckyel@hyperbola.info>
2021-02-26 12:05:58 -05:00
James Taylor
889dabb112
proto.py: Fix base64 encoding in make_protobuf
First issue: Cannot check for presence of list in dictionary
because it is not hashable.
Second issue: Wrong function name was being used (make_proto
instead of _make_protobuf)

Signed-off-by: Jesús <heckyel@hyperbola.info>
2021-02-26 11:50:03 -05:00
James Taylor
d604a007a9
Debugging response saving: save page even if it's an HTTP error
This will help debug new types of exit node blockage or other
errors.

Signed-off-by: Jesús <heckyel@hyperbola.info>
2021-02-26 11:48:38 -05:00
James Taylor
07f14343c4
Use mobile embed page to bypass captcha blockage
The aggressive IP-blocking doesn't apply to embed pages

Fixes #47

Signed-off-by: Jesús <heckyel@hyperbola.info>
2021-02-26 11:40:38 -05:00
James Taylor
00ef1c8627
Fix comment replies
Comment reply protobuf now requires the channel id of the uploader
of the video. Otherwise the endpoint returns 500.

Instead of making the protobuf ourselves and passing this data
around through query parameters, just use the ctoken provided to us
but modify the max_replies field from 10 to 250.

Fixes #53

Signed-off-by: Jesús <heckyel@hyperbola.info>
2021-02-26 11:39:23 -05:00
f26c9be85e
Fix URL 2021-02-25 14:27:46 -05:00
875e1ef986
Change URL repo 2021-02-25 13:08:25 -05:00
0c3fddd16d
Add badge status CI/CD 2021-02-24 22:50:19 -05:00
ec4f7d29e4
Add test dependencies in requirement.txt file 2021-02-24 22:44:03 -05:00
e3a009a6bd
Revert "Add .build.yml file"
This reverts commit 5b611b515a147dbf6a32f7a94b03a8c477e0bba7.
2021-02-24 22:42:09 -05:00
ae6bce5edc
Add test dependencies in requirement.txt file 2021-02-24 22:40:54 -05:00
5b611b515a
Add .build.yml file 2021-02-24 22:35:43 -05:00
945acf3e60
Add tests/__init__.py file 2021-02-24 22:30:59 -05:00
James Taylor
31fe1dac55
Fix signature decryption due to new base.js minifier rules
YouTube now includes e.g. {"fe": ...} instead of just {fe: ...}
in the javascript object entries in the object holding the
operation definitions.

Fixes #2

Signed-off-by: Jesús <heckyel@hyperbola.info>
2021-02-23 17:17:06 -05:00
James Taylor
4a8ba594d1
TorMgr: Change new identity cooldown to 7 seconds instead of 6
Because sometimes a new identity was not being respected

Signed-off-by: Jesús <heckyel@hyperbola.info>
2021-02-13 17:36:52 -05:00
James Taylor
1cc0ffcb20
yt_data_ext: support richGrid&richItem sometimes used on search
Some searches have these renderers instead of the usual ones

Signed-off-by: Jesús <heckyel@hyperbola.info>
2021-02-13 17:29:05 -05:00
dd5876e0c6
fix missing whitespace 2021-01-31 20:13:46 -05:00
a47dd66bd0
General theme: reorganize thumbnail background variable 2021-01-26 22:23:59 -05:00
James Taylor
52ca49628f
fetch_url: 429: get new identity regardless of page content
New 429 captcha page doesn't have IP. This new page appears to
match the 429 code plus the json of {"redirect": ...} which would
be occasionally received when the pbj json endpoint was used in
the past.

Closes #22

Signed-off-by: Jesús <heckyel@hyperbola.info>
2021-01-13 18:07:00 -05:00
8cc721b4ec
General theme: improve colors 2021-01-11 21:14:07 -05:00
58eea1e0f2
Light theme: improve colors 2021-01-11 19:43:41 -05:00
3868295b05
Organize docs 2021-01-10 15:31:22 -05:00
78abaf7aba
General theme: fix support 'Content-Security-Policy' with librejs in UXP 2021-01-09 11:15:41 -05:00
5c22c654ce
Grey theme: improve thumbnail background 2021-01-09 08:27:30 -05:00
7cb6c94879
General theme: improve thumbnail in channel 2021-01-08 11:43:57 -05:00
d899bc2df5
General theme: improve thumbnail-img 2021-01-07 23:06:25 -05:00
5329ecfd08
General theme: Improve container description 2021-01-01 22:39:47 -05:00
3570b5c4d1
General theme: Fix missing styles in pagination 2021-01-01 15:03:17 -05:00
3e817298bb
General theme: fix HTML syntax 2021-01-01 14:52:24 -05:00
5a6e247a7f
General theme: fix style paginator 2021-01-01 14:48:42 -05:00
3a83796f91
General theme: remove unnecessary z-index property 2020-12-31 18:23:44 -05:00
48e7cdd9a4
Improve regex to pep8 2020-12-31 12:59:20 -05:00
ce56cbad2a
Update README.md 2020-12-30 16:54:09 -05:00
1f4d7cc958
General theme: fix syntax W3C markup and add improve 'Published' date
Signed-off-by: Jesús <heckyel@hyperbola.info>
2020-12-30 16:52:26 -05:00
056c3be3f2
strip_non_ascii in comments-author-name 2020-12-30 00:04:41 -05:00
0a9d24b261
General theme: Add license to missing script in watch.html 2020-12-29 21:33:56 -05:00
ec6cb3923e
Update requirements.txt 2020-12-29 18:21:54 -05:00
7c046d82ee
General theme: Fix script generate for timestamp
Also add support librejs
2020-12-29 17:32:40 -05:00
0f78e73e80
General theme: add license and add URL source code in footer 2020-12-29 15:36:23 -05:00
James Taylor
701786a9cc
util: Remove obsolete parse_info_prepare_for_html function
Info parsing is handled by yt_data_extract, and html
post-processing is done with util.prefix_urls and
util.add_extra_html_info

Signed-off-by: Jesús <heckyel@hyperbola.info>
2020-12-28 11:48:20 -05:00
James Taylor
e1fe6b1d8e
Remove obsolete uppercase_escape function
This function was only necessary with the old ajax format, which
was removed in 4d7bba92eb62518e2273d030235214f4a7605444

Signed-off-by: Jesús <heckyel@hyperbola.info>
2020-12-28 11:43:57 -05:00
James Taylor
b567a34ecd
TorManager: Add delay before subsequent new identity retries
The request can be retried immediately after the first
new identity, but if we do more new identities, we have to wait
for at least 6 seconds before doing the request, otherwise
it won't be done on a new ip based on my experiments.

Potential issue: If after getting third new identity, request
takes > 12 seconds (since timeout is 15) and returns 429, then the
Tor Manager will let it do a 4th try instead of giving up (meaning
request is taking forever from user's perspective).
Should be a very rare occurence however.

Signed-off-by: Jesús <heckyel@hyperbola.info>
2020-12-25 22:56:19 -05:00