Commit graph

22 commits

Author SHA1 Message Date
Vincent Nagel
b1c310ce22 ageRestrictedContent first draft
Cookie updated whenever ageRestrictedContent setting is changed or
service is changed. Right now there is only a cookie for youtube, but
cookies for other services could be added in the future.

Problems with this approach: Even when the service is set to youtube,
the downloader doesn't only request youtube urls e.g. it also sends
reqeusts to i.ytimg.com, suggestqueries.google.com, and yt3.ggpht.com.
The ageRestrictedContent cookie is not normally sent when sending
requests to these other urls, so doing so might have unknown effects.
2020-04-20 21:45:32 -05:00
Stypox
c62e363ba5 Save and restore cookies to/from preferences
So that the user does not have to solve a recaptcha every time he opens the app
2020-04-15 13:30:27 +02:00
Stypox
9620cf2051 Remove duplicate check if cookies are already present 2020-04-15 13:30:27 +02:00
Stypox
1de5323696 Fix recaptcha activity for another type of recaptcha page
Try to get cookies from pages even when they start loading, because non-html pages like ones with `pbj=1` never stop loading.
Try to extract the cookie directly from the redirection url, by looking at the field "google_abuse=".
Add `GOOGLE_ABUSE_EXEMPTION=` to the youtube recaptcha cookies.
2020-04-15 13:30:27 +02:00
wb9688
ac264464ef Improve code style to be more consistent 2020-04-02 15:57:50 +02:00
Laurent Arnoud
37ae893c9e Migrate annotation to androidx on ReCaptchaActivity 2020-02-18 21:50:28 +01:00
Stypox
eec0ae3bb8 Remove unused imports and clean up comment style 2020-02-02 21:48:45 +01:00
Stypox
e276a743f5 Fix addYoutubeCookies functions (Yt changed things lately) 2020-02-02 21:33:07 +01:00
Stypox
afcbe6c016 Remove left-behind Log 2020-02-01 18:24:16 +01:00
Stypox
55d7a645f8 Try to extract cookies just before closing recaptcha activity
Even if the page didn't auto-close
2020-02-01 18:24:16 +01:00
Stypox
f41d13e559 Move "Done" button and make it theme conpliant in ReCaptcha 2020-02-01 18:24:16 +01:00
Stypox
c218bddf25 Improve formatting 2020-02-01 18:24:16 +01:00
Stypox
3b648428b4 Fix ReCaptchaActivity crash and save cookies correctly 2020-02-01 18:24:16 +01:00
Mauricio Colli
cb2f0625b1 Use new Localization and Downloader implementations from extractor 2019-11-17 23:58:52 -03:00
Robin
edd5ad2d13 Migrate to AndroidX 2019-10-04 14:59:08 +02:00
Stypox
0439b55672 Load the url from the exception in the ReCaptchaActivity
Sometimes YouTube introduces recaptchas only on some pages. By loading the url inside the ReCaptchaException into ReCaptchaActivity's webview, the page that originally caused the problem is shown. The user can then solve the page-specific recaptcha.
2019-08-17 09:33:51 +02:00
BO41
55ef791c88 data flow issue + declaration redundancy
make final
unused methods
make final

BUILD SUCCESSFUL in 0s
39 actionable tasks: 39 up-to-date
2018-09-11 19:18:41 +02:00
Mauricio Colli
806e7c4bf5 Improve some aspects of the Downloader implementation 2018-02-21 08:08:52 -03:00
Mauricio Colli
146d4a8365 Update extractor and refactored NewPipe 2017-09-03 13:57:12 -03:00
Mauricio Colli
adbeff11d4 Minor improvements 2017-04-26 16:32:20 -03:00
Benoît Mauduit
c87da9903f Set result code and finish() Activity instead of starting MainActivity
* Activities will start reCaptchaActivity with startActivityForResult and
look for RECAPTCHA_REQUEST and RESULT_OK | RESULT_CANCELED in : 'onActivityResult()'
2017-01-03 14:38:22 +01:00
Benoît Mauduit
54eb353d0d Add ReCaptcha Activity
* ReCaptchas are implemented using a simple WebView with Javascript enable.

 * All HTTP responses inside the WebView are catched (using onPageFinished())
 ** When Google reCatcha cookies are detected, register cookies to the
    Downloader class and Return to MainActivity
2016-12-07 22:26:54 +01:00