persepolisdm / persepolis

Persepolis is a download manager written in Python.
https://persepolisdm.github.io
GNU General Public License v3.0
6.24k stars 651 forks source link

I can't download from Youtube ! #497

Open clodez opened 6 years ago

clodez commented 6 years ago

System Details:

Issue Description and steps to reproduce: I tried all possible tricks for aria2.conf to make this work like creating the file and adding ca-certificate=/usr/local/share/certs/ca-root-nss.crt note is that I have installed youtube_dl using pip with => sudo pip-3.6 install --upgrade youtube_dl

awaiting Your feedback .

alireza-amirsamimi commented 6 years ago

Hello Persepolis dosn't use user's conf file.

Question: can persepolis find the link with VideoFinder?

clodez commented 6 years ago

yes it can , and it can detect several video resolution from the drop down menu button .

alireza-amirsamimi commented 6 years ago

I have no problem with youtube, ... links. It's related to aria2c. Do you have same problem with DailyMotion or Vimeo ?

clodez commented 6 years ago

seems You are right I have a Problem with all https links ! I can download http just fine ex : http://download.videolan.org/pub/videolan/vlc/3.0.1/vlc-3.0.1.tar.xz

alireza-amirsamimi commented 6 years ago

@clodez Try dns resolvers or Tor. May they fix the problem.

clodez commented 6 years ago

please explain more about how to try Tor or dns resolver !!

alireza-amirsamimi commented 6 years ago

@clodez Unfortunately I'm not familar with BSD :( May this link helps you. If You use tor or tor browser, You need also privoxy.

clodez commented 6 years ago

I don't think it's a browser issue , but it should be an aria2c SSL/TLS config or missing dependency issue , using another browser and some proxy will not fix the issue , I guess ! any other suggestions ?

alireza-amirsamimi commented 6 years ago

@clodez What aria2c version is installed on your system?

clodez commented 6 years ago

aria2 version 1.33.1

alireza-amirsamimi commented 6 years ago

@clodez I have this version too :) I have no idea why it happens for you. Try Tor and privoxy :)

clodez commented 6 years ago

I am trying , still not able to make persepolis work with tor-proxy , yet ...

alireza-amirsamimi commented 6 years ago

@clodez How do you set proxy in Persepolis

clodez commented 6 years ago

I tried privoxy which works with firefox browser , but did not work with persepolis , when creating a new download from the GUI select the second tab Proxy .

alireza-amirsamimi commented 6 years ago

@clodez Do you use 127.0.0.1 for ip and 8118 for port?

clodez commented 6 years ago

sorry missed adding the error from persepolis log is : Download failed - GID : 947ea9802b4fa964/nMessage : SSL/TLS handshake failure: unable to get local issuer certificate , same as direct connection !

clodez commented 6 years ago

yes this is exactly what I am using 127.0.0.1 and port 8118

Monirzadeh commented 6 years ago

aria2c can download from any other https link?

clodez commented 6 years ago

how can I test aria2c from the command line , I tried but failed

Monirzadeh commented 6 years ago

try any other links that start with https, with or without proxy. maybe the problem is similar this issue: https://github.com/aria2/aria2/issues/781 follow the suggestion and especially test this https://github.com/aria2/aria2/issues/781#issuecomment-262553754 for sure source of the problem is which of them Persepolis or aria2c. aria2c "YourlinkURL"

clodez commented 6 years ago

1- aria2c https://download.anydesk.com/AnyDesk.exe 04/14 16:14:08 [NOTICE] Downloading 1 item(s) 04/14 16:14:08 [ERROR] Failed to load trusted CA certificates from no. Cause: error:02001002:system library:fopen:No such file or directory 04/14 16:14:08 [ERROR] CUID#7 - Download aborted. URI=https://download.anydesk.com/AnyDesk.exe

2- aria2c --check-certificate=false https://download.anydesk.com/AnyDesk.exe

04/14 16:15:15 [NOTICE] Downloading 1 item(s)

04/14 16:15:15 [ERROR] Failed to load trusted CA certificates from no. Cause: error:02001002:system library:fopen:No such file or directory [#ba4b1b 1.6MiB/1.9MiB(87%) CN:1 DL:307KiB]
04/14 16:15:21 [NOTICE] Download complete: /down/AnyDesk.exe

using --check-certificate=false , makes it work , now how can I apply that to persepolis ?

Monirzadeh commented 6 years ago

@alireza-amirsamimi review above report I am not sure about security that deactivates check certificate. what do you think about that?

ghost commented 6 years ago

@clodez : according to this try installing security/ca_root_nss package. see the post in freebsd forum.

clodez commented 6 years ago

done that before posting for help , that did not work for persepolis , but I just double checked it's working from the command line !!

Monirzadeh commented 6 years ago

@clodez I confused!!! https://github.com/persepolisdm/persepolis/issues/497#issuecomment-381328612 I am not expected to work on Pespolise because Persepolis use aria2c and --check-certificate=true by default but this test shows the problem is not from any other option

clodez commented 6 years ago

I am sorry , let me add what I changed in the last note that @morealaz cleared , I created ~/.aria2/aria2.conf and added ca-certificate=/etc/ssl/cert.pem to the conf file . but that made aria2c work from the command line without the need to add "--check-certificate=false" but it still fail from the GUI .

clodez commented 6 years ago

Guys I read a bit the code of download.py and managed to make it work by adding : --ca-certificate=/etc/ssl/cert.pem =>

start aria2 with RPC

def startAria():

in Linux and BSD

if os_type == 'Linux' or os_type == 'FreeBSD' or os_type == 'OpenBSD':
    os.system("aria2c --version 1> /dev/null")
    os.system("aria2c --ca-certificate=/etc/ssl/cert.pem --no-conf  --enable-rpc --rpc-listen-port '" 

I am guessing --no-conf is stopping aria2c from reading the conf that I added earlier , can someone explain why are you guys using --no-conf ! . there is definitely a better way of fixing this in the code , any suggestions ?

alireza-amirsamimi commented 6 years ago

Persepolis configures aria itself. User can select some options in preference window. So Persepolis must call aria2 with --no-conf . Perhaps user's conf. file has conflict with Persepolis's configuration.

terry-toerag commented 6 years ago

I use Mandriva Scion Linux...and use youtube-dl {URL] to download youtube vids EG youtube-dl https://www.youtube.com/watch?v=lJxVnGekbWo.