Redwid / android-youtube-dl

The android library that wraps Python 2.7 and youtube-dl python scripts
36 stars 10 forks source link

The current youtube-dl is too old #2

Closed ZhangKuixun closed 5 years ago

ZhangKuixun commented 5 years ago

The current youtube-dl is too old, Can you compile one with a new "private.mp3"? @Redwid

Redwid commented 5 years ago

What commit you are looking for? My youtube-dl has the latest commit number: 2e1280ed432257244ea52a47efe6a7f0e226b897

ZhangKuixun commented 5 years ago

I want to use the latest version of youtube-dl to compress and generate different versions of libraries, because youtube-dl updates the code in real time for different websites. Your YouTube-dl code is too old. I've always wanted to do your update, but I can't do your update. And you want an x86 version of so

ZhangKuixun commented 5 years ago

This is I changed your clean-build-copy.sh. I use python3, I want use python of host, but I can't install pip and sh.

clean() {
echo "[INFO]     Clean"
/Library/Frameworks/Python.framework/Versions/3.7/bin/python3 $p4a clean_builds
rm -rfv $distFolder
rm -rfv $PWD/build
echo "[INFO]     Clean done"
}

build() {
echo "[INFO]     Build [$1]"
/Library/Frameworks/Python.framework/Versions/3.7/bin/python3 $p4a clean_builds
rm -rfv $distFolder
/Library/Frameworks/Python.framework/Versions/3.7/bin/python3 $p4a apk --private $pythonApp --dist_name=$pythonAppDistName --package=$pythonAppPackageName --name=$pythonAppName --version=1 --ndk_dir $ndkDir --ndk_version r10e --requirements=android,pyopenssl,pycrypto,openssl,cloudpickle --android_api=27 --arch=$1 --java-build-tool gradle
copy_libs
copy_assets
echo "[INFO]     Build [$1] done"
}
Redwid commented 5 years ago

I'm using python 2.7.10 for build. May that will make difference for you. It's better to try.

I'm using this library constantly without any issues. So, my old youtube-dl code works perfectly fine for me (for a quite wide numbers of channels and videos). In general I'm planning update if video info extraction will not work as expected. Do you have any links that I could test?

I'm not able to build x86 arch as well. If that is a must for you, I recommend you to search for another library. Or try to get help from python-for-android team.

ZhangKuixun commented 5 years ago

eg: https://www.youtube.com/watch?v=RHMm7-uuZZ0&app=desktop many url can't get video-url

Redwid commented 5 years ago

Your url info: device-2018-12-18-101037

And all links is working for me. For example #43 640x360 (medium) start playing in chrome: device-2018-12-18-101301

ZhangKuixun commented 5 years ago

I'm checking my code.

Redwid commented 5 years ago

Have you build and install my android-youtube-dl apk? Have you tested sharing from youtube app to android-youtube-dl app?

ZhangKuixun commented 5 years ago

error:

Traceback (most recent call last): File "/Volumes/disk/youtube-dl/youtube_dl/main.py", line 19, in File "/Volumes/disk/youtube-dl/youtube_dl/init.py", line 482, in main File "/Volumes/disk/youtube-dl/youtube_dl/init.py", line 463, in _real_main File "/Volumes/disk/youtube-dl/youtube_dl/YoutubeDL.py", line 1999, in download File "/Volumes/disk/youtube-dl/youtube_dl/YoutubeDL.py", line 797, in extract_info File "/Volumes/disk/youtube-dl/youtube_dl/YoutubeDL.py", line 851, in process_ie_result File "/Volumes/disk/youtube-dl/youtube_dl/YoutubeDL.py", line 1629, in process_video_result File "/Volumes/disk/youtube-dl/youtube_dl/YoutubeDL.py", line 1700, in process_info File "/Volumes/disk/youtube-dl/youtube_dl/YoutubeDL.py", line 730, in _match_entry File "/Volumes/disk/youtube-dl/youtube_dl/utils.py", line 1350, in contains File "/Volumes/disk/youtube-dl/youtube_dl/utils.py", line 1313, in date_from_str TypeError: attribute of type 'NoneType' is not callable

ZhangKuixun commented 5 years ago

Have you build and install my android-youtube-dl apk? Have you tested sharing from youtube app to android-youtube-dl app?

Yes, I download your android-youtube-dl android. I don't tested sharing from youtube app to android-youtube-dl app, but I test sharing form My app to android-youtube-dl app, It's going to crash, but I didn't read the log.

ZhangKuixun commented 5 years ago

really many url can't get video-url. I just forgot a lot of websites.

https://www.dailymotion.com/video/x6xwk6y?playlist=x64re9_xid this url can't get video-url

Redwid commented 5 years ago

Sorry, I'm not interesting in dailymotion. You could find yourself what is wrong and create pull request with a fix.

ZhangKuixun commented 5 years ago

do you have Email or WeChat, It's very inconvenient for call you.

Redwid commented 5 years ago

Hello @ZhangKuixun It's important to use NDK r16b. I've added set up instruction to my build script.

Redwid commented 5 years ago

Updated to release 2019.01.23: 7cbfd98516c2632984c60f785d437d0f10e76841