Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uploaded.to: 'NoneType' object has no attribute 'group' #68

Closed
tearcatcher opened this issue Apr 7, 2013 · 3 comments
Closed

Uploaded.to: 'NoneType' object has no attribute 'group' #68

tearcatcher opened this issue Apr 7, 2013 · 3 comments
Labels
plugin bug Plugin isn't working

Comments

@tearcatcher
Copy link

Hello,

when i start a download i get this message (Debug):

07.04.2013 04:21:47 INFO Download starts: http://ul.to/XXX
07.04.2013 04:21:47 WARNING Download failed: http://ul.to/XXX | 'NoneType' object has no attribute 'group'
Traceback (most recent call last):
File "/opt/share/pyload/module/PluginThread.py", line 187, in run
pyfile.plugin.preprocessing(self)
File "/opt/share/pyload/module/plugins/Plugin.py", line 233, in preprocessing
self.setup()
File "/opt/share/pyload_config/userplugins/hoster/UploadedTo.py", line 102, in setup
self.fileID = getID(self.pyfile.url)
File "/opt/share/pyload_config/userplugins/hoster/UploadedTo.py", line 18, in getID
return m.group('ID')
AttributeError: 'NoneType' object has no attribute 'group'

Content of UploadedTo.py (/opt/share/pyload_config/userplugins/hoster/UploadedTo.py):

-- coding: utf-8 --

import re

from module.utils import html_unescape, parseFileSize

from module.plugins.Hoster import Hoster
from module.network.RequestFactory import getURL
from module.plugins.Plugin import chunks
from module.plugins.ReCaptcha import ReCaptcha

key = "bGhGMkllZXByd2VEZnU5Y2NXbHhYVlZ5cEE1bkEzRUw=".decode('base64')

def getID(url):
""" returns id from file url"""
m = re.match(r"http://[\w.-]?(uploaded.(to|net)|ul.to)(/file/|/??id=|.?&id=)(?P\w+)", url)
return m.group('ID')

def getAPIData(urls):
post = {"apikey": key}

idMap = {}

for i, url in enumerate(urls):
    id = getID(url)
    post["id_%s" % i] = id
    idMap[id] = url

api = unicode(getURL("http://uploaded.net/api/filemultiple", post=post, decode=False), 'iso-8859-1')

result = {}

if api:
    for line in api.splitlines():
        data = line.split(",", 4)
        if data[1] in idMap:
            result[data[1]] = (data[0], data[2], data[4], data[3], idMap[data[1]])

return result

def parseFileInfo(self, url='', html=''):
if not html and hasattr(self, "html"): html = self.html
name, size, status, found, fileid = url, 0, 3, None, None

if re.search(self.FILE_OFFLINE_PATTERN, html):
    # File offline
    status = 1
else:
    found = re.search(self.FILE_INFO_PATTERN, html)
    if found:
        name, fileid = html_unescape(found.group('N')), found.group('ID')
        size = parseFileSize(found.group('S'))
        status = 2

return name, size, status, fileid
  • /opt/share/pyload_config/userplugins/hoster/UploadedTo.py 1/229 0%

The file is manually downable. What's wrong?!

All users have full rights (777). pyLoad runs on a Synology NAS (Diskstation 412+).

@enkore
Copy link
Contributor

enkore commented Apr 7, 2013

Could you provide a sample download link for uploaded.to?

@dararu
Copy link

dararu commented Apr 7, 2013

try this: http://ul.to/710h4r5i

stickell added a commit that referenced this issue Apr 7, 2013
@stickell stickell closed this as completed Apr 7, 2013
@tearcatcher
Copy link
Author

THANK YOU VERY MUCH!! .... now it works! :))

really great and fast support! >>LIKE IT<<

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
plugin bug Plugin isn't working
Development

No branches or pull requests

4 participants