Redwid / android-youtube-dl

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

can't download from twitter #7

Closed xibr closed 5 years ago

xibr commented 5 years ago

Hello, when try to download from Twitter app stopping or don't get response

xibr commented 5 years ago

I think the error in format_id int in Twitter response like this string: "hls-256"

java.lang.NumberFormatException: For input string: "hls-256"

java.lang.Integer.parseInt(Integer.java:615)
java.lang.Integer.parseInt(Integer.java:650)
com.google.gson.JsonPrimitive.getAsInt(JsonPrimitive.java:264)
org.redwid.android.youtube.dl.app.utils.JsonHelper.getAsInt(JsonHelper.java:39)
org.redwid.android.youtube.dl.app.model.Format.<init>(Format.java:33)
org.redwid.android.youtube.dl.app.gui.MainActivity.parseFormats(MainActivity.java:240)
org.redwid.android.youtube.dl.app.gui.MainActivity.initData(MainActivity.java:205)
org.redwid.android.youtube.dl.app.gui.MainActivity.access$000(MainActivity.java:44)
org.redwid.android.youtube.dl.app.gui.MainActivity$1.onReceive(MainActivity.java:62)
android.app.LoadedApk$ReceiverDispatcher$Args.lambda$getRunnable$0(LoadedApk.java:1483)
android.app.-$$Lambda$LoadedApk$ReceiverDispatcher$Args$_BumDX2UKsnxLVrE6UJsJZkotuA.run(Unknown Source:2)
android.os.Handler.handleCallback(Handler.java:873)
android.os.Handler.dispatchMessage(Handler.java:99)
android.os.Looper.loop(Looper.java:214)
android.app.ActivityThread.main(ActivityThread.java:6981)
java.lang.reflect.Method.invoke(Native Method)
com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1445)

java.lang.RuntimeException: Error receiving broadcast Intent { act=org.redwid.android.youtube.dl.result.JSON_RESULT_SUCCESS flg=0x10 (has extras) } in org.redwid.android.youtube.dl.app.gui.MainActivity$1@9ddb275

--------- Stack trace ---------

Redwid commented 5 years ago

Hello, could you please provide any url for testing?

xibr commented 5 years ago

try this, or any url from Twitter

https://twitter.com/bn_Rashid/status/769084713466200064?s=19

Redwid commented 5 years ago

Fixed, please test on the latest version.

xibr commented 5 years ago

hi, now is working fine, how can i change m3u8 to mp4 ?

Redwid commented 5 years ago

App is using -j flag, to get JSON from youtube-dl python script. If you need something else, feel free to modify that.