Need help with scraping imdb watchlist

Mikey1234

Banned
May 6, 2012
1,441
0
0
UK
this is what I use

First is grab names you associated ie.wife,me blah blah and you actual watchlist
Code:
def IMDB_LISTS(url): 
        addDir('Watch List',IMDBTV_WATCHLIST,8,art+'imdb.png','','','','')
        if ADDON.getSetting('imdb_user') == 'ur********':
                xbmcgui.Dialog().ok('EasyNews Information','You Need To Input Your IMDb Number Into ','Addon Settings')
        if ADDON.getSetting('message') == 'false':
                xbmcgui.Dialog().ok('EasyNews Information','            For Full Support For This Plugin Please Visit','                    [COLOR yellow][B]WWW.XBMCHUB.COM[/B][/COLOR]','Please Turn Off Message in Addon Settings')
        url=IMDB_LIST
        link=OPEN_URL(url)
        match = re.compile('<div class="list_name"><b><a    onclick=".+?"     href="(.+?)"    >(.+?)</a>').findall(link)
        for url, name in match:
            url='http://www.imdb.com'+str(url)+'?start=1&view=grid&sort=listorian:asc&defaults=1'   
            addDir(name,url,8,art+'imdb.png','','','','')    
            setView('movies', 'default-view')
second is grabbing the info

Code:
def WATCH_TV_LIST(url):
        link=OPEN_URL(url)
        link=str(link).replace('\n','').replace('src="http://i.media-imdb.com/images/SFaa265aa19162c9e4f3781fbae59f856d/nopicture/medium/film.png" ','')
        link=link.split('<div class="list grid">')[1]
        link=link.split('<div class="see-more">')[0]
        match=re.compile('''src="(.+?)".+?<a href="(.+?)">(.+?)</a>''').findall(link)
        for iconimage, url, name in match:
            if re.search('V1', iconimage, re.IGNORECASE):
                regex=re.compile('(.+?)_V1.+?.jpg')
                match = regex.search(iconimage)
                iconimage='%s_V1_.SX593_SY799_.jpg'%(match.group(1))
                fanart=str(iconimage).replace('_.SX593_SY799_','')
            else:
                fanart='None'
            url = 'http://www.imdb.com'+str(url)
            name=str(name).replace('·','').replace(''','').replace('&','And').replace(':','')
            series=str(name)
            description=''
            addDir(name,url,24,iconimage,fanart,series,description,'')   
            setView('movies', 'movies-view')
 

Mikey1234

Banned
May 6, 2012
1,441
0
0
UK
plus these are the urls you need

first is for name list i.e wife blah blah

second is public normal watchlist

Code:
def imdbtv_watchlist_url():
    return "http://www.imdb.com/user/" + ADDON.getSetting('imdb_user') + "/watchlist?start=1&view=grid&sort=listorian:asc&defaults=1"
    
def imdb_list_url():
    return 'http://www.imdb.com/user/' + ADDON.getSetting('imdb_user') + '/lists?tab=public'

so you public list will be this

http://www.imdb.com/user/ur0779588/lists?tab=public

but you have to make sure you set it as public
 

Mikey1234

Banned
May 6, 2012
1,441
0
0
UK
of course it worked lol

glad you got it fixed and thank you for meta crap

I just changed your tv one to episode

so thank you
 

coolwave

Banned
May 8, 2012
219
0
0
Canada
So i got it working but trying to sort movies and tv shows and can't find a way to get it done! Any help on this would be great thanks