[WIP] SuicideGirls picture viewer
#1
Ok so this is my first attempt at a plugin, its currently non-functioning but I can just feel I'm close Smile
You need a membership to the site for it to work.
At the moment login is working and its pulling a list of latest sets and the thumbnails, but seems not to be setting the cookies right and when trying to view a photoset its getting the non-member site.
The code is a lift from the video.Fantasticc plugin from the xbmc-adult repo, I'm using the weblogin.py by Anarchintosh @ xbmcforums to do my login and cookie stuff
Think i'm going to have to roll out a network trace and see if i'm missing some cookie/header stuff with my logins.

Plan will be to add search and browse girls as well as the Set of the day etc. and then look at adding videos too


Enjoy, and i'll be hacking away next few days to make it work Smile

Code is at https://github.com/sp00nhead/xbmcsuicide only been tested on windows7 so far.

sp00n
Reply
#2
Try t0mm0's common library. It's in the main repo and it's worked well for me
Reply
#3
I'll take a look, cheers

Ok just reading up on it now, rewrite time already Smile Really should read up more before jumping straight in
Reply
#4
Ok might have found a massive help here - https://github.com/plex-unofficial/Suici..._init__.py
just need to check the licence as none in the files, but might help me. The login code/url is what i'm using so at least im going the right path.
Plan is to move the url stuff to use the t0mm0 libs and in the process i might need to write my own login method.
Just need to get back into a codeing head mood Smile


EDIT: woop - thanks to looking at that code i can now see there's lots of lovely XML data i can use, will make getting links etc easy no page phasing for me Smile
Reply
#5
Score! I'm pretty sure open repos on github require GPL based licensing

Login should be pretty easy, I'm actually working on adding pro account login support to some urlresolvers so that should give you an idea. Basically, create a dict of the form data, submit it with http_POST(data=MyFormDataDict) to the login url, then save cookies. Set cookies before sending anything that needs to be logged in to view. In the resolver below I've added a little extra checking to see if the session is still valid and avoid trying to login again and etc, but that's the mechanics of it

https://github.com/bstrdsmkr/script.modu...er.py#L142
Reply
#6
Thanks, i think in my first version i was doing the login ok, but not saving the cookies, so when i was launching a new net instance to pull the pictures it was as if i wan't logged in. Been long time since done any coding so this is a nice start back Smile
I'll have a scan of your login code
Just got to get head round xml processing, elementtree seems ok, but when using net.http_get seems to be not liking the format.
all fun Smile
Reply
#7
github does not enforce any license. obviously it's hard to hide your sources but that's completely different from you allowing others to use your code under GPL.
Reply

Logout Mark Read Team Forum Stats Members Help
[WIP] SuicideGirls picture viewer0