• 1
  • 2
  • 3(current)
  • 4
  • 5
  • 9
[Release] Parsedom and other functions
#31
Sure, what html codes do you want?
Reply
#32
All of 'em Smile

You never know what codes you may encounter. So I'd go for a comprehensive list of all codes that might be encountered.
Reply
#33
Tried out 0.9.1 from mercurial.
got errors on import cookielibs (rename to cookielib works)

fetchPage with post_data works but I have same problem as with urllib2 the redirect_url doesn't have the querystring I need to fetch.

#using parseDom
urlparams = {CLIENT_ID_KEY: CLIENT_ID_VALUE,
REDIRECTURI: REDURI,
RESPONSETYPE: TOKEN,
SCOPE: NONE_EXPIRY,
DISPLAY: POPUP,
USERNAME_KEY: self.username,
PASSWORD_KEY: self.password}

result = self.common.fetchPage({"link": url,"post_data": urlparams})
print(result["new_url")
> http://www.google.be

#using httplib2
urldata = urllib.urlencode(urlparams)
h = httplib2.Http(disable_ssl_certificate_validation=True)
response, content = h.request(url, 'POST', urldata, headers={'Content-type': 'application/x-www-form-urlencoded'})
print(response['location'])
>http://www.google.be?#access_token=132145647897

any idea ? If this can be solved I can remove httplib2 and only use parseDOM
Reply
#34
Hm, well urllib, urllib2 and httplib all do things slightly differently.

I will have to investigate.

Could you pm me a fully functional httplib2 implementation of the process you want done. (of course without your username and password) for me to play with?
Reply
#35
TobiasTheCommie Wrote:Hm, well urllib, urllib2 and httplib all do things slightly differently.

I will have to investigate.

Could you pm me a fully functional httplib2 implementation of the process you want done. (of course without your username and password) for me to play with?

pm sent Smile thx for the help
Reply
#36
I don't understand why your code sample above doesn't work.

That is exactly what i did to get your snippet working
Reply
#37
Strange still not working.
I'll wait until there is a full release of 0.9.1 and try again.
Reply
#38
Any ETA on 0.9.1 ?
Also if our plugin depends on 0.9.0 and you update it to 0.9.1 how will xbmc handle the dependencies ?
Reply
#39
_Pierre_ Wrote:Any ETA on 0.9.1 ?
Also if our plugin depends on 0.9.0 and you update it to 0.9.1 how will xbmc handle the dependencies ?

It will automaticly update to 0.9.1 because that version number is higher than what you require. You just give the minimum version what your script requires
Read/follow the forum rules.
For troubleshooting and bug reporting, read this first
Interested in seeing some YouTube videos about Kodi? Go here and subscribe
Reply
#40
Ah so it will break the plugins depending on it.
Reply
#41
_Pierre_ Wrote:Ah so it will break the plugins depending on it.

No it doesn't. If a plugin depends on version 0.9.0 and they update to 0.9.1 there is no problem.
dependancy it the minimum version required. So no harm if there's a higher version.
Read/follow the forum rules.
For troubleshooting and bug reporting, read this first
Interested in seeing some YouTube videos about Kodi? Go here and subscribe
Reply
#42
In this case it will break.
Cause in 0.9.0 it's _fetchPage()
and in 0.9.1 it's fetchPage()
Reply
#43
Yes it will break. This will NOT be the case after the 1.0.0 version.

ETA: Did you get it working?
Reply
#44
_Pierre_ Wrote:Any ETA on 0.9.1 ?
Also if our plugin depends on 0.9.0 and you update it to 0.9.1 how will xbmc handle the dependencies ?

None what so ever. It will be released with YouTube 2.9.0. So if google decides to change the login tomorrow you will get it pretty quickly. If not it will take longer.

But if i should make a guess, i would say weeks rather than days.
Reply
#45
I think xbmc keeps multiple numbered versions for the rollback system now doesn't it? In which case it may keep using the old one?? Probably it uses the latest installed one actually, even if the older one is present - so if the API/behaviour changes it will break but not per se because the newer version is installed.

Anyway, it does say that changes are forthcoming so until a 1.0 release one must expect some breakage etc.
Addons I wrote &/or maintain:
OzWeather (Australian BOM weather) | Check Previous Episode | Playback Resumer | Unpause Jumpback | XSqueezeDisplay | (Legacy - XSqueeze & XZen)
Sorry, no help w/out a *full debug log*.
Reply
  • 1
  • 2
  • 3(current)
  • 4
  • 5
  • 9

Logout Mark Read Team Forum Stats Members Help
[Release] Parsedom and other functions1