Giter Club home page Giter Club logo

Comments (13)

stickell avatar stickell commented on May 13, 2024

Works for me. Youtube plugin has recently been update, maybe last changes have fixed the problem.

Try to download the last version from here and put it in your userplugins/hoster folder.

from pyload.

someblueuser avatar someblueuser commented on May 13, 2024

If someone will has same problem (it exist even with latest YouTube plugin installed on OpenWRT backfire), I found a workaround. It's quite dirty, but downloads will work.
What need to do: In ../pyload/module/plugins/hoster/YoutubeCom.py file just add:
.encode('ascii','replace')]
at the end of line:
name = re.search(file_name_pattern, html).group(1).replace("/", "")
so it will loks like:
name = re.search(file_name_pattern, html).group(1).replace("/", "").encode('ascii','replace')]
and all non-ascii chars will be replaced by "?", however downloads will start working.
Solution found on:
http://eko.one.pl/forum/viewtopic.php?id=4990 [PL]
Thanks.

from pyload.

stickell avatar stickell commented on May 13, 2024

I tried again to downlod that file and I get the output file name exactly as it is, with all the special chars.

I can't understand what is wrong with you. Try to execute:

pyLoadCore.py --debug

and post me the log when it prints the error.

from pyload.

someblueuser avatar someblueuser commented on May 13, 2024

I think my problem can be with Router TL-MR3220 OpenWRT backfire and python packages (there is only one availible - 2.6.x) . I wrote this solution only for (I believe) very small group of people who can see similar errors.
Here is log:

72  08.04.2013 23:12:26 DEBUG   XFileSharingPro: Pattern loaded - handling 79 hosters
73  08.04.2013 23:12:26 INFO    pyLoad is up and running
74  08.04.2013 23:12:29 INFO    No Updates for pyLoad
75  08.04.2013 23:12:29 INFO    No plugin updates available
76  08.04.2013 23:12:46 INFO    Added package test containing 1 links
77  08.04.2013 23:12:46 INFO    Download starts: http://www.youtube.com/watch?v=A7ixwXiMTDo
78  08.04.2013 23:12:47 DEBUG   YoutubeCom: AVAILABLE STREAMS: [44, 35, 43, 34, 18, 5, 36, 17]
79  08.04.2013 23:12:47 DEBUG   YoutubeCom: DESIRED STREAM: ITAG:37 (.mp4 1920x1080 Q:9 3D:False) NOT found, allowed
80  08.04.2013 23:12:48 DEBUG   YoutubeCom: Choosing nearest fmt: [(18, True, 7), (43, True, 6), (44, True, 4)]
81  08.04.2013 23:12:48 DEBUG   YoutubeCom: Chosen fmt: 44
82  08.04.2013 23:12:48 DEBUG   YoutubeCom: URL: http://r13---sn-5hn7ym7e.c.youtube.com/videoplayback?mv=m&ip=31.62.124.215&key=yt1&upn=nUxM8jZx2lE&expire=1365480876&source=youtube&sparams=cp%2Cid%2Cip%2Cipbits%2Citag%2Cratebypass%2Csource%2Cupn%2Cexpire&ipbits=8&ratebypass=yes&itag=44&mt=1365455539&sver=3&ms=au&id=o-AMMGyJNc6isIGUBhr9SWJS81K2Jha6Wq7Z7Ffrn4wRjN&fexp=902543%2C932000%2C932004%2C906383%2C902000%2C901208%2C919512%2C929903%2C925714%2C931202%2C900821%2C900823%2C931203%2C931401%2C906090%2C909419%2C908529%2C930807%2C919373%2C930803%2C906836%2C920201%2C929602%2C930101%2C926403%2C900824%2C910223&newshard=yes&cp=U0hVSlRTTl9MUENONV9MTVJJOkt6X2ZKdlcwSTlt&nh=EAE&signature=4A27B1F61D2A3ECF682DDE14858969B61343509E.4666143F7FA62F69421D94AE097D3407D204DC6D
83  08.04.2013 23:12:48 WARNING Download failed: Tajemnice największej sieci szpiegowskiej świata -Max Kolonko Mówię Jak Jest.webm | 'ascii' codec can't encode character u'\u0119' in position 27: ordinal not in range(128)
84  08.04.2013 23:12:50 INFO    Debug Report written to debug_YoutubeCom_08-04-2013_23-12-48.zip

And zip: http://www58.zippyshare.com/v/37143611/file.html

from pyload.

RaNaN avatar RaNaN commented on May 13, 2024

Non utf8 systems often have problems if the content is not decoded to unicode, which may be the case for the filename.

from pyload.

stickell avatar stickell commented on May 13, 2024

Try using:

name = re.search(file_name_pattern, html).group(1).replace("/", "").encode('utf-8','replace')

instead of ascii should preserve special characters.

from pyload.

someblueuser avatar someblueuser commented on May 13, 2024

It looks like it doesen't work. Download not starting, with status "failure". However there isn't any printed error message, even in debug mode logs.

from pyload.

stickell avatar stickell commented on May 13, 2024

Another solution to try:
add at the top of the file:

from unicodedata import normalize

then change the line to:

name = normalize('NFD', re.search(file_name_pattern, html).group(1).replace("/", "")).encode('ascii', 'ignore')

This should convert special characters to their most similar value in ascii, so Cześć will became Czesc.
I know it's not a perfect solution, but it's better than replacing with ?.

from pyload.

someblueuser avatar someblueuser commented on May 13, 2024

I have checked it a moment ago, and it works exactly as You described, downloads works fine. IMO it is very good and sufficient solution, far better than replacing by "?" and can be added to next plugin version. Thanks.

from pyload.

stickell avatar stickell commented on May 13, 2024

UTF-8 systems like mine can download files with special characters in their name without problems so it's not a good idea to convert them even if the system can handle them. Maybe we could use a try-except statement to handle the situation with this workaround. Stay tuned.

from pyload.

stickell avatar stickell commented on May 13, 2024

Please download this and test it.

from pyload.

someblueuser avatar someblueuser commented on May 13, 2024

Doesn't Work, download not starting, status: failed.

327 14.04.2013 16:26:58 INFO    Added package sd containing 1 links
328 14.04.2013 16:26:59 INFO    Download starts: http://www.youtube.com/watch?v=A7ixwXiMTDo
329 14.04.2013 16:27:00 WARNING Download failed: http://www.youtube.com/watch?v=A7ixwXiMTDo | 'sig'
330 14.04.2013 16:27:03 INFO    Debug Report written to debug_YoutubeCom_14-04-2013_16-27-00.zip
331 14.04.2013 16:27:03 INFO    UnSkipOnFail: look for skipped duplicates for watch?v=A7ixwXiMTDo (pid:18)...
332 14.04.2013 16:27:03 DEBUG   All downloads processed 

debugFiles: http://www20.zippyshare.com/v/68003406/file.html

from pyload.

stickell avatar stickell commented on May 13, 2024

@RaNaN says that the upcoming pyLoad version will handle the encoding problems in the core so the plugin should not be modified. Please use the workaround until the next version will be released. Thanks

from pyload.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.