Login and cookies
#16
bad reply..........
Reply
#17
t0mm0 Wrote:are you using a free account? if so you need to add the correct delay before accessing the video link (see this code from anarchintosh for a handy countdown function)

t0mm0

nope, im using a real account, I just took it out when I posted the code here. I think im getting the correct url from m3gaupload and get a direct link. But maybe Im not using the cookies the right way and im getting it as a free user. How could I know?

Also tommo like my nick suggets Im really new to python, It has been a little hard for me to follow all your modules because you dont add a Usage feature on top in the comments. I dont know what variables to send, I been following your posts and I know your code is what I could use but I just dont know how to.
Reply
#18
pythonn00b Wrote:nope, im using a real account, I just took it out when I posted the code here. I think im getting the correct url from m3gaupload and get a direct link. But maybe Im not using the cookies the right way and im getting it as a free user. How could I know?

by 'real' account do you mean 'free' or 'premium'? i don't kniow anything about how premium accounts work as i don't have one, but free accounts require 25 seconds waiting before accessing the url, if you don't log in at all you need to wait 45 seconds.

you can try loading the page 'http://www.megaupload.com/?c=account' from your script and printing the html you get back - that will tell you what sort of account it is logged in as.

t0mm0
Reply
#19
Should there really be spaces in the url? You might try replacing with "%20"
Code:
for url in match:
           url=url.replace(' ','%20')
          addLink("SOURCE",url,'')
Reply
#20
divingmule Wrote:Should there really be spaces in the url? You might try replacing with "%20"
Code:
for url in match:
           url=url.replace(' ','%20')
          addLink("SOURCE",url,'')

Thanks I added this to the code.


t0mm0 Wrote:by 'real' account do you mean 'free' or 'premium'? i don't kniow anything about how premium accounts work as i don't have one, but free accounts require 25 seconds waiting before accessing the url, if you don't log in at all you need to wait 45 seconds.

you can try loading the page 'http://www.megaupload.com/?c=account' from your script and printing the html you get back - that will tell you what sort of account it is logged in as.

t0mm0

Im printing the whole page and yeah, Im not logged in Sad
how do I use the countdown to test even when not logged in?

Thank you a lot guys for your help.
Reply
#21
guys, I got video Big Grin

The problem was the path for the cookies, I was pointing to / just deleted that and looked in my current plugin folder and the login was successful and could scrap the correct link. Thats with a premium account.
Reply
#22
pythonn00b Wrote:guys, I got video Big Grin

The problem was the path for the cookies, I was pointing to / just deleted that and looked in my current plugin folder and the login was successful and could scrap the correct link. Thats with a premium account.

cool, glad you got it sorted!

hopefully the urlresolver stuff i'm currently working on will avoid the need for this complication in the future Wink

t0mm0
Reply
#23
t0mm0 Wrote:cool, glad you got it sorted!

hopefully the urlresolver stuff i'm currently working on will avoid the need for this complication in the future Wink

t0mm0

t0mm0, please add the usage of your modules in the top description, because I want to use the countdown module and I will have to go over it slowly(because Im really a newbie) to figure out how to use it.

If you could give me a hint it would be great(Y)
Reply
#24
pythonn00b Wrote:t0mm0, please add the usage of your modules in the top description, because I want to use the countdown module and I will have to go over it slowly(because Im really a newbie) to figure out how to use it.

If you could give me a hint it would be great(Y)

that code is by anarchintosh, but it's pretty self explanatory:

Code:
[b]countdown(time_to_wait,title='',text='')[/b]

time_to_wait = num of seconds to delay
title = title of dialog box (optional)
text = line of text to go in the dialog box (optional)

i think documentation is really important, so the urlresolver stuff will be fully documented in the code and with an example addon and probably a tutorial too, once it gets to a more stable state.

t0mm0.
Reply
#25
t0mm0 Wrote:that code is by anarchintosh, but it's pretty self explanatory:

Code:
[b]countdown(time_to_wait,title='',text='')[/b]

time_to_wait = num of seconds to delay
title = title of dialog box (optional)
text = line of text to go in the dialog box (optional)

i think documentation is really important, so the urlresolver stuff will be fully documented in the code and with an example addon and probably a tutorial too, once it gets to a more stable state.

t0mm0.

thanks t0mm0, I followed your jerrysienfield or whatever that name is spelled tutorial, it was the first thing that actually run Smile
Reply
#26
guys I have my plugin working for megaupload with appletv2, I can use a premium user or without an account and it works like a champ. The problem Im having is under linux where Im testing the plugin. Under linux I can get video without an account and waiting the 45 seconds, but whem I try to with a premium accout it just hangs and brings the proper url to play the video but it doesnt start.

I know im getting the correct video because I already printed the source page and saw my username and the Welcome message there, also, If I dont use an account I delete the cookie file for megaupload and write it only when an use account is present. I have permision to write on the folder because I can see the cookie file being written and modified when I logged in.

Do you guys have any idea whats going on? testing on the appletv is not really my thing..
Reply
#27
okay guys, I have cornered my error just want to know if you know anything about this..

On appletv:

1.- Playing a movie with premium account or no account works
2.- Playing a smaller file a tv show episode with premium or no account works.

On Linux:

1.- Playing a movie with premium account DOESNT WORK but WORKS with no account.
2.- Playing a smaller file a tv show episode with premium WORKS or no account WORKS too.

Im assuming that the smaller file and cache for the video files are playing a role here, anyone? Or maybe the index of the movie file for no account is diferent than the one with a premium account.

The file hoster is of course megaupload.
Reply
#28
pythonn00b Wrote:okay guys, I have cornered my error just want to know if you know anything about this..

dunno why it would be different across platforms - are you using the same xbmc versions? does using a free account work (would prove you are handling cookies correctly)?

it's pretty much impossible to know what is happening without seeing your code.....

any reason why you are not just using anarchintosh's megaupload code (like i have in urlresolver) which is known to work?

t0mm0
Reply
#29
Sorry heres my code so far...

Since Im so new when I see anarchintosh's I get confused because I dont understand certain things. So Im only copy-pasting what I understand in order to have complete control and knowledge of whats going on, it has worked so-so and Im learning a lot in the process.

Im using on linux version 10.1 compiled march 09 of 2011, on appletv the lastest stable release which is the june 23 version. The only modules im using is the gethtml and weblogin from anarchistosh. Thanks t0mm0 for taking the time to answer my questions Smile

P.S. using a premium account from megaupload works as expected on appletv I dont have to wait for the movie, I can skip to anywhere in the movie plus if I print the source page of megaupload my premium account username shows up plus the downlink is different. Cookies are also written to my default folder, I had to set up a routine to delete the cookies if no account was set because I wouldnt get a SOURCE link to watch the video because of the cookies.
Reply

Logout Mark Read Team Forum Stats Members Help
Login and cookies0