Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
pyload-9999: Downloadmanager for various One-Click-Hosters
View unanswered posts
View posts from last 24 hours

Goto page 1, 2  Next  
Reply to topic    Gentoo Forums Forum Index Unsupported Software
View previous topic :: View next topic  
Author Message
Dr.Willy
Guru
Guru


Joined: 15 Jul 2007
Posts: 547
Location: NRW, Germany

PostPosted: Sun Jun 19, 2011 2:35 pm    Post subject: pyload-9999: Downloadmanager for various One-Click-Hosters Reply with quote

Recently I was looking for a replacement for JDownloader and after trying various smaller projects that were usually lacking in some area I think I found a nice tool.
http://pyload.org wrote:
pyLoad is a fast, lightweight and full featured download manager for many One-Click-Hoster, container formats like DLC, video sites or just plain http/ftp links. It aims for low hardware requirements and platform independence to be runnable on all kind of systems (desktop pc, netbook, NAS, router).
Despite its strict restriction it is packed full of features just like webinterface, captcha recognition, unrar and much more.

pyLoad is divided into core and clients, to make it easily remote accessible. Currently there are a webinterface, command line interface, a GUI written in Qt and an Android client.


I wrote an ebuild for both the latest stable (0.4.6 as time of writing) and scm version.
The ebuild is a bit rough, working around some ugliness in the sources (like putting dependencies in the source tree - ugh)

Edit:
PyLoad now has a new and shiny bug at gentoo bugzilla:
https://bugs.gentoo.org/show_bug.cgi?id=374871


Last edited by Dr.Willy on Tue Sep 20, 2011 12:18 pm; edited 2 times in total
Back to top
View user's profile Send private message
opotonil
l33t
l33t


Joined: 17 Jun 2005
Posts: 801
Location: 127.0.0.1

PostPosted: Wed Jun 22, 2011 4:47 pm    Post subject: Reply with quote

Good work, but it does install web interface?

I wrote a ebuild, more simple, for version 0.4.5 beta and it required dev-python/bottle for the web interface (https://forums.gentoo.org/viewtopic-t-865443-highlight-pyload.html).

I apologize for my english.
Back to top
View user's profile Send private message
Ant P.
Watchman
Watchman


Joined: 18 Apr 2009
Posts: 6920

PostPosted: Wed Jun 22, 2011 5:28 pm    Post subject: Reply with quote

Is it any more reliable than net-misc/plowshare?
Back to top
View user's profile Send private message
Dr.Willy
Guru
Guru


Joined: 15 Jul 2007
Posts: 547
Location: NRW, Germany

PostPosted: Wed Jun 22, 2011 5:35 pm    Post subject: Reply with quote

opotonil wrote:
Good work, but it does install web interface?

I wrote a ebuild, more simple, for version 0.4.5 beta and it required dev-python/bottle for the web interface

Yes it does.
As I said, the devs included some of the pyload dependencies in the sources. You will find bottle.py in pyload/module/lib. There are some other things in that directory that should eventually be replaced with properly installed libraries, but for now I went with the 'release early, release often' approach, so I only replaced the libraries we have in gentoo's stable tree ;)
There is still quite a bit of work to do, but first I wanted to see if there is even interest in the program and an ebuild for it.

Things that should be fixed in the future:
- move components (core, qt-gui, webinterface) out of /opt
- maybe find a better place for pyloads workdir (currently /var/lib/pyload)
- replace shipped libraries in pyload/module/lib
- maybe adjust default configs

Ant P. wrote:
Is it any more reliable than net-misc/plowshare?

"reliable"?

Anyway, I'll have to pass that question since I haven't tried plowshare so far.
Back to top
View user's profile Send private message
marcelvs
n00b
n00b


Joined: 10 Sep 2005
Posts: 30

PostPosted: Tue Aug 23, 2011 11:05 pm    Post subject: Re: pyload-9999: Downloadmanager for various One-Click-Hoste Reply with quote

Dr.Willy wrote:
Recently I was looking for a replacement for JDownloader and after trying various smaller projects that were usually lacking in some area I think I found a nice tool.
http://pyload.org wrote:
pyLoad is a fast, lightweight and full featured download manager for many One-Click-Hoster, container formats like DLC, video sites or just plain http/ftp links. It aims for low hardware requirements and platform independence to be runnable on all kind of systems (desktop pc, netbook, NAS, router).
Despite its strict restriction it is packed full of features just like webinterface, captcha recognition, unrar and much more.

pyLoad is divided into core and clients, to make it easily remote accessible. Currently there are a webinterface, command line interface, a GUI written in Qt and an Android client.


I wrote an ebuild for both the latest stable (0.4.6 as time of writing) and scm version.
The ebuild is a bit rough, working around some ugliness in the sources (like putting dependencies in the source tree - ugh)


Hi, do you have a server where I can download your ebuild ? I am asking this because, as I can see, this ebuild is not complete.
Thanks.
Back to top
View user's profile Send private message
Rion
Guru
Guru


Joined: 12 Oct 2006
Posts: 383
Location: Minsk, Belarus

PostPosted: Wed Aug 24, 2011 3:56 am    Post subject: Reply with quote

aria2 has bunch of frontends. I'd better use one of them
_________________
rion-overlay
Back to top
View user's profile Send private message
Dr.Willy
Guru
Guru


Joined: 15 Jul 2007
Posts: 547
Location: NRW, Germany

PostPosted: Wed Aug 24, 2011 12:58 pm    Post subject: Re: pyload-9999: Downloadmanager for various One-Click-Hoste Reply with quote

marcelvs wrote:
Hi, do you have a server where I can download your ebuild ? I am asking this because, as I can see, this ebuild is not complete.
Thanks.

You are right, the init.d and service files are not included here.
I'm afraid, I don't have a server, but I will update the first post.

Rion wrote:
aria2 has bunch of frontends. I'd better use one of them

Well, good luck getting aria2 to work with one-click-hosters then…
Back to top
View user's profile Send private message
yellowhat
Guru
Guru


Joined: 10 Sep 2008
Posts: 528

PostPosted: Tue Sep 20, 2011 8:53 am    Post subject: Reply with quote

Hi all,
I want to try this interesting program so I copy ebuild and files to my local overlay but I get this error, when I launch "ebuild pyload-9999.ebuild manifest":

Code:
/usr/portage/dist/local/net-misc/pyload/pyload-9999.ebuild: line 154: warning: here-document at line 87 delimited by end-of-file (wanted `EOF')
/usr/portage/dist/local/net-misc/pyload/pyload-9999.ebuild: line 155: syntax error: unexpected end of file
 * ERROR: net-misc/pyload-9999 failed (depend phase):
 *   error sourcing ebuild
 *
 * Call stack:
 *   ebuild.sh, line 526:  Called die
 * The specific snippet of code:
 *            source "$EBUILD" || die "error sourcing ebuild"
 *
 * If you need support, post the output of 'emerge --info =net-misc/pyload-9999',
 * the complete build log and the output of 'emerge -pqv =net-misc/pyload-9999'.
 * This ebuild is from an overlay named 'yellowhat-overlay': '/usr/portage/dist/local/'
 * S: '/var/tmp/portage/net-misc/pyload-9999/work/pyload'


Thanks
Back to top
View user's profile Send private message
Dr.Willy
Guru
Guru


Joined: 15 Jul 2007
Posts: 547
Location: NRW, Germany

PostPosted: Tue Sep 20, 2011 11:24 am    Post subject: Reply with quote

Looks to me like you copy'd only half of the ebuild. :P

Man, I really need to upload the files somewhere. Any suggestions where I could put them?
Back to top
View user's profile Send private message
yellowhat
Guru
Guru


Joined: 10 Sep 2008
Posts: 528

PostPosted: Tue Sep 20, 2011 11:31 am    Post subject: Reply with quote

I copied all ebuild, error seems to be here:
Code:

   # fix workdir
   cat > ${S}/module/config/configdir <<-EOF
      ${PYLOAD_WORKDIR}
   EOF
Back to top
View user's profile Send private message
yellowhat
Guru
Guru


Joined: 10 Sep 2008
Posts: 528

PostPosted: Tue Sep 20, 2011 11:32 am    Post subject: Reply with quote

Quote:
Man, I really need to upload the files somewhere. Any suggestions where I could put them?


Why don't you copy ebuild here: https://bugs.gentoo.org/show_bug.cgi?id=374871
Back to top
View user's profile Send private message
Dr.Willy
Guru
Guru


Joined: 15 Jul 2007
Posts: 547
Location: NRW, Germany

PostPosted: Tue Sep 20, 2011 11:39 am    Post subject: Reply with quote

yellowhat wrote:
Why don't you copy ebuild here: https://bugs.gentoo.org/show_bug.cgi?id=374871

Sounds good. Will do.

yellowhat wrote:
I copied all ebuild, error seems to be here:
Code:

   # fix workdir
   cat > ${S}/module/config/configdir <<-EOF
      ${PYLOAD_WORKDIR}
   EOF

Well, that should work - at least I don't see why it wouldn't.
Maybe try replacing those lines with
Code:
echo "${PYLOAD_WORKDIR}" > ${S}/module/config/configdir
Back to top
View user's profile Send private message
yellowhat
Guru
Guru


Joined: 10 Sep 2008
Posts: 528

PostPosted: Tue Sep 20, 2011 11:56 am    Post subject: Reply with quote

Thanks!!!!!!!!

That worked very good. This is ebuild that I used

Code:
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

EAPI=3

inherit base eutils python systemd

if [[ ${PV} == *9999 ]]; then
   EHG_REPO_URI="http://bitbucket.org/spoob/pyload/"
   inherit mercurial
fi

PYTHON_DEPEND="2"
PYTHON_USE_WITH="sqlite"

DESCRIPTION=""
HOMEPAGE="http://www.pyload.org"
LICENSE="GPL-3"
SLOT="0"

if [[ ${PV} == *9999 ]]; then
   KEYWORDS="~amd64 ~x86"
   SRC_URI=""
else
   KEYWORDS="amd64 x86"
   SRC_URI="http://get.pyload.org/static/pyload-src-v${PV}.zip"
fi

IUSE="captcha clicknload container curl qt4 ssl systemd"

RDEPEND="
   dev-python/beautifulsoup
   dev-python/beaker
   dev-python/feedparser
   dev-python/simplejson
   captcha? (
      dev-python/imaging
      app-text/tesseract[linguas_en]
   )
   clicknload? (
   || (
      dev-lang/spidermonkey
      dev-java/rhino
   )
   )
   container? (
      dev-python/pycrypto
   )
   curl? (
      dev-python/pycurl
   )
   qt4? (
      dev-python/PyQt4
   )
   ssl? (
      dev-python/pycrypto
      dev-python/pyopenssl
   )
"
#clicknload? ( || ( ... ossp-js pyv8 ) )

S=${WORKDIR}/${PN}

PYLOAD_WORKDIR="/var/lib/pyload" # (/var/lib/ in lack of a better place)

pkg_setup() {
   python_pkg_setup

#   enewuser "pyload" -1 -1 "${PYLOAD_WORKDIR}"
}

src_unpack() {
   if [[ ${PV} == *9999 ]]; then
      mercurial_src_unpack
   else
      default
      #base_src_unpack
   fi
}

src_prepare() {
   # fix pidfile
   sed -i -e 's:self.pidfile = "pyload.pid":self.pidfile = "/var/run/pyload.pid":' ${S}/pyLoadCore.py

   # fix workdir
   echo "${PYLOAD_WORKDIR}" > ${S}/module/config/configdir

   # replace some shipped dependencies with the system libraries
   rm -r \
      ${S}/module/lib/BeautifulSoup.py \
      ${S}/module/lib/beaker \
      ${S}/module/lib/feedparser.py \
      ${S}/module/lib/simplejson

   find ${S}/module/ -name "*.py" -type f -print0 | xargs -0 \
   sed -i \
      -e 's:from module.lib.BeautifulSoup:from BeautifulSoup:' \
      -e 's:from module.lib \(import feedparser.*\):\1:' \
      -e 's:from module.lib.simplejson:from simplejson:' \
      #${S}/module/**/*.py # globbing not working -> find


   if ! use qt4; then
      rm -r ${S}/module/gui
   fi
}
src_configure() {
   :
}

src_compile() {
   :
}

src_install() {
   insinto "/opt/${PN}"
   doins -r ${S}/locale
   doins -r ${S}/module
   doins -r ${S}/scripts
   doins ${S}/pyLoadCore.py
   doins ${S}/pyLoadCli.py

   make_wrapper "pyloadcli" "/opt/${PN}/pyLoadCli.py"

   if use qt4; then
      doins -r ${S}/icons
      make_wrapper pyloadgui "/opt/${PN}/pyLoadGui.py"
   fi

   dodir "${PYLOAD_WORKDIR}"
   cp "${S}/module/config/default.conf" "${D}/${PYLOAD_WORKDIR}/pyload.conf"
   #fix tmpdir
   ln -sf "/tmp" "${D}/${PYLOAD_WORKDIR}/tmp"

   newinitd "${FILESDIR}/pyload" "pyload"

   if use systemd; then
      systemd_dounit "${FILESDIR}/pyload.service"
   fi
}

pkg_postinst() {
   if use ssl && ! test -f "${PYLOAD_WORKDIR}/ssl.key"; then
      einfo "If you want to use pyLoad's XML-RPC via SSL have to create a key in pyloads work directory"
      echo
      einfo "cd ${PYLOAD_WORKDIR}"
      einfo "openssl genrsa 1024 > ssl.key"
      einfo "openssl req -new -key ssl.key -out ssl.csr"
      einfo "openssl req -days 36500 -x509 -key ssl.key -in ssl.csr > ssl.crt"
   fi
}



After installation how can I start pyload using web interface? Running "/etc/init.d/pyload start" gives me:

Code:
pyload             | * Starting PyLoad ...
pyload             | * start-stop-daemon:   does not exist
pyload             |/etc/init.d/pyload: line 13: --pidfile: command not found
pyload             |/etc/init.d/pyload: line 14: --exec: command not found                              [ !! ]
pyload             | * ERROR: pyload failed to start
Back to top
View user's profile Send private message
yellowhat
Guru
Guru


Joined: 10 Sep 2008
Posts: 528

PostPosted: Tue Sep 20, 2011 12:04 pm    Post subject: Reply with quote

Running "python /opt/pyload/pyLoadCore.py -s" as root I can configure pyload, but to start daemon I have to type "python /opt/pyload/pyLoadCore.py".
"/etc/init.d/pyload start" continues to give me that error
Back to top
View user's profile Send private message
yellowhat
Guru
Guru


Joined: 10 Sep 2008
Posts: 528

PostPosted: Tue Sep 20, 2011 12:15 pm    Post subject: Reply with quote

Modifing /etc/init.d/pyload in this way worked for me:

Code:
#!/sbin/runscript

NAME="PyLoad Daemon"
PIDFILE=/var/run/pyload.pid

depend() {
   need net
}

start() {
   ebegin "Starting PyLoad daemon"

   start-stop-daemon --start -q -b \
   --pidfile ${PIDFILE} \
   --exec /usr/bin/env python2 /opt/pyload/pyLoadCore.py --
   eend $?
}

stop() {
   ebegin "Stopping PyLoad daemon"
   start-stop-daemon --stop -q --pidfile ${PIDFILE}
   eend $?
}
Back to top
View user's profile Send private message
Dr.Willy
Guru
Guru


Joined: 15 Jul 2007
Posts: 547
Location: NRW, Germany

PostPosted: Tue Sep 20, 2011 12:17 pm    Post subject: Reply with quote

Well, that is 100% copy and paste error. I guess you have some whitespace behind the \ so that breaks the multiline statements.
Anyway. I uploaded the files on bugzilla. Try if those work for you.
Back to top
View user's profile Send private message
yellowhat
Guru
Guru


Joined: 10 Sep 2008
Posts: 528

PostPosted: Tue Sep 20, 2011 12:18 pm    Post subject: Reply with quote

By the way thank you very much
Back to top
View user's profile Send private message
InvisibleRasta
Apprentice
Apprentice


Joined: 30 Mar 2011
Posts: 188

PostPosted: Fri Sep 23, 2011 4:39 pm    Post subject: Reply with quote

('Filesize does not match recorded size', 1303376, 313696)
!!! Fetched file: pyload-src-v0.4.7.zip VERIFY FAILED!
!!! Reason: Filesize does not match recorded size
!!! Got: 1303376
!!! Expected: 313696
how do i fix this

i tyed the 9999 version but there is no /etc/init.d/pyload after fetch. there is only a pyloadcli executable and if i run it i get
/usr/bin/pyloadcli: line 10: /opt/pyload/pyLoadCli.py: Permission denied
/usr/bin/pyloadcli: line 10: exec: /opt/pyload/pyLoadCli.py: cannot execute: Permission denied
Back to top
View user's profile Send private message
yellowhat
Guru
Guru


Joined: 10 Sep 2008
Posts: 528

PostPosted: Fri Sep 23, 2011 5:37 pm    Post subject: Reply with quote

You have to add "pyload init.d file" to files directory in order to get /etc/init.d/pyload
Back to top
View user's profile Send private message
InvisibleRasta
Apprentice
Apprentice


Joined: 30 Mar 2011
Posts: 188

PostPosted: Fri Sep 23, 2011 9:10 pm    Post subject: Reply with quote

what do u mean sorry? can u explain how to install it please
Back to top
View user's profile Send private message
yellowhat
Guru
Guru


Joined: 10 Sep 2008
Posts: 528

PostPosted: Fri Sep 23, 2011 11:16 pm    Post subject: Reply with quote

Do you copied pyload to your overlay? For example /usr/portage/local/net-misc/pyload
Now in this folder you have to create a folder called "files" (/usr/portage/local/net-misc/pyload/files) where you have to copy ""pyload init.d file" and "pyload systemd service".
Back to top
View user's profile Send private message
InvisibleRasta
Apprentice
Apprentice


Joined: 30 Mar 2011
Posts: 188

PostPosted: Fri Sep 23, 2011 11:45 pm    Post subject: Reply with quote

ls -la files/
total 16
drwxr-xr-x 2 root root 4096 Sep 24 01:41 ./
drwxr-xr-x 3 root root 4096 Sep 24 01:43 ../
-rw-r--r-- 1 root root 383 Sep 24 01:41 pyload init.d file
-rw-r--r-- 1 root root 161 Sep 24 01:41 pyload systemd service
still not working.
after isntall i get /usr/bin/pyloadcli: line 10: /opt/pyload/pyLoadCli.py: Permission denied
/usr/bin/pyloadcli: line 10: exec: /opt/pyload/pyLoadCli.py: cannot execute: Permission denied
and i got no other pyload... executable
Back to top
View user's profile Send private message
yellowhat
Guru
Guru


Joined: 10 Sep 2008
Posts: 528

PostPosted: Fri Sep 23, 2011 11:51 pm    Post subject: Reply with quote

I think that file should be called
pyload init.d file --> pyload
pyload systemd service --> pyload.service

After install you have to run "python2 /opt/pyload/pyLoadCli.py -s"
Back to top
View user's profile Send private message
yellowhat
Guru
Guru


Joined: 10 Sep 2008
Posts: 528

PostPosted: Sat Sep 24, 2011 7:33 am    Post subject: Reply with quote

How can I run pyLoadCore.py as user? If I try to run I get:

Code:
Traceback (most recent call last):
  File "/opt/pyload/pyLoadCore.py", line 600, in <module>
    pyload_core.start()
  File "/opt/pyload/pyLoadCore.py", line 260, in start
    self.config = ConfigParser()
  File "/opt/pyload/module/ConfigParser.py", line 47, in __init__
    self.checkVersion()
  File "/opt/pyload/module/ConfigParser.py", line 87, in checkVersion
    self.checkVersion(n + 1)
  File "/opt/pyload/module/ConfigParser.py", line 87, in checkVersion
    self.checkVersion(n + 1)
  File "/opt/pyload/module/ConfigParser.py", line 87, in checkVersion
    self.checkVersion(n + 1)
  File "/opt/pyload/module/ConfigParser.py", line 65, in checkVersion
    f = open("pyload.conf", "rb")
IOError: [Errno 13] Permission denied: 'pyload.conf'
Back to top
View user's profile Send private message
yellowhat
Guru
Guru


Joined: 10 Sep 2008
Posts: 528

PostPosted: Sat Sep 24, 2011 7:35 am    Post subject: Reply with quote

If I run "pyLoadCore.py -s" as root it works without problem, but when I reboot pyload web interface doesn't start anymore, running "pyLoadCore.py" as root:

Code:
Traceback (most recent call last):
  File "pyLoadCore.py", line 600, in <module>
    pyload_core.start()
  File "pyLoadCore.py", line 300, in start
    self.init_logger(logging.INFO) # logging level
  File "pyLoadCore.py", line 449, in init_logger
    encoding="utf8"
  File "/usr/lib/python2.7/logging/handlers.py", line 118, in __init__
    BaseRotatingHandler.__init__(self, filename, mode, encoding, delay)
  File "/usr/lib/python2.7/logging/handlers.py", line 65, in __init__
    logging.FileHandler.__init__(self, filename, mode, encoding, delay)
  File "/usr/lib/python2.7/logging/__init__.py", line 893, in __init__
    StreamHandler.__init__(self, self._open())
  File "/usr/lib/python2.7/logging/__init__.py", line 914, in _open
    stream = codecs.open(self.baseFilename, self.mode, self.encoding)
  File "/usr/lib/python2.7/codecs.py", line 881, in open
    file = __builtin__.open(filename, mode, buffering)
IOError: [Errno 13] Permission denied: u'/var/lib/pyload/Logs/log.txt'


To let it start I have to delete "/var/lib/pyload" folder (configuration folder), restart "/etc/init.d/pyload restart" and run "pyLoadCore.py -s" on every reboot.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Unsupported Software All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum