pytube

330 views
Skip to first unread message

markl...@gmail.com

unread,
Jul 6, 2023, 9:58:37 PM7/6/23
to Kivy users support
I am trying to make an app using pytube module to download Youtube videos.

It worked previously and then I got the following error:-

pytube.exceptions.RegexMatchError: get_throttling_function_name: could not find match for multiple

After some searches, I managed to modify the cipher.py file and the program runs without error in my PC.  Also no errors using the PyInstaller packaged version.

However when I compile the program into an apk file using buildozer, I got the error again eventhough I changed the cipher.py programs at

.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/python-installs/dlYoutube/arm64-v8a/pytube

and

.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/python-installs/dlYoutube/armeabi-v7a/pytube

I have used the "clean" option to build the apk.

It seems that buildozer does not included my modified cipher.py in the apk.  Or is there some other things I nave not understood or done?

Help appreciated.

Robert

unread,
Jul 6, 2023, 10:11:10 PM7/6/23
to Kivy users support
I expect 'clean'  is the issue (I use appclean), this will delete the app's Buildozer database.
The package will be re-downloaded, you can see this by reading the log.

Personally I never mess around in Buildozer's database, to me confusion is the expected result.

Mark Leong

unread,
Jul 7, 2023, 10:20:32 PM7/7/23
to kivy-...@googlegroups.com
Dear Robert,

Thank you for the quick response.

I use python3 -m buildozer android release --clean to build the app and that does not seem to help.

if buildozer re-down packages, it would overwrite the cipher.py file that I change, wouldn't it?

Does that mean I have no option but to wait for pytube to update?

Is there a way to tell buildozer to re-include the amended cipher.py file in the next build?

Regards

Mark Leong
8th Jul 2023

--
You received this message because you are subscribed to the Google Groups "Kivy users support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kivy-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kivy-users/6b1feb8f-45a6-49bb-ac6c-974b1ab5f478n%40googlegroups.com.

Robert

unread,
Jul 7, 2023, 10:57:05 PM7/7/23
to Kivy users support
We almost always have options, sometimes we don't like them, sometimes we don't know if they work till we try them.

Things I'd try

1) I have only tried this for kivy , but it might (I won't say should!) work, see buildozer.spec
# (str) Custom source folders for requirements
# Sets custom source for any requirements with recipes
# requirements.source.kivy = ../../kivy
requirements.source.pytube = ../pytube_modified

2) fork pytube , modify the fork and reference the fork in  requirements

3) build a local recipe and implement the modifications with a patch.

Mark Leong

unread,
Jul 9, 2023, 11:16:29 PM7/9/23
to kivy-...@googlegroups.com
Hi Robert,

Thank you for your help.  

Will give suggestion A a go.

Regards

Mark Leong
10th Jul 2023

Reply all
Reply to author
Forward
0 new messages