if(motherless_linktype=="board"): getlinks = pymotherless.get_motherless_boards_links(getargs.url, getargs_headers, getargs_cj, getargs.use_httplib); innumlinks = getlinks['numoflinks']; innumcount = 0; while(innumcount < innumlinks): inmotherless_linktype = pymotherless.get_motherless_link_type(getlinks[innumcount]['url']); if(inmotherless_linktype=="link"): motherless_links_dir.append(getargs.url.rsplit('/', 1)[-1]); motherless_links.append(getlinks[innumcount]['url']); innumcount = innumcount + 1; if(getargs.get_url==True): listsize = len(motherless_links); listcount = 0; while(listcount < listsize): print(pymotherless.get_motherless_links(motherless_links[listcount], getargs_headers, getargs_cj, getargs.use_httplib)['url']); listcount = listcount + 1; if(getargs.get_pageurl==True): listsize = len(motherless_links); listcount = 0; while(listcount < listsize): print(motherless_links[listcount]); listcount = listcount + 1; if(getargs.get_filename==True): listsize = len(motherless_links); listcount = 0; while(listcount < listsize): print(pymotherless.get_motherless_links(motherless_links[listcount], getargs_headers, getargs_cj, getargs.use_httplib)['fullfilename']); listcount = listcount + 1;
def default(self, *args, **kwargs): cherrypy.response.headers['Content-Type'] = 'text/html; charset=UTF-8' getpyurlpath = urllib.parse.urlparse(cherrypy.url()).path getpymotherless = "http://motherless.com" + getpyurlpath pymotherlessinfo = pymotherless.get_motherless_link_type_alt( getpymotherless) IndexHTMLCode = getpyurlpath + " - " + pymotherlessinfo[ 'motherlessinfo'] if (pymotherlessinfo['motherlessinfo'] == "sample" or pymotherlessinfo['motherlessinfo'] == "sample-videos"): IndexHTMLCode = "" getpyurlinfo = pymotherless.get_motherless_sample_links( geturls_headers, geturls_cj, numoflinks=15, urltype="video") counti = 0 while (counti < 15): IndexHTMLCode = IndexHTMLCode + " <a href=\"" + getpyurlinfo[ 'videos']['recent'][counti]['url'].replace( 'http://motherless.com', '' ) + "\"><img src=\"" + getpyurlinfo['videos']['recent'][ counti]['thumbnail'] + "\" alt=\"" + getpyurlinfo[ 'videos']['recent'][counti][ 'title'] + "\" title=\"" + getpyurlinfo[ 'videos']['recent'][counti][ 'title'] + "\" /></a>\n" counti = counti + 1 IndexHTMLCode = IndexHTMLCode + "<div><br /> <br /></div>\n" counti = 0 while (counti < 15): IndexHTMLCode = IndexHTMLCode + " <a href=\"" + getpyurlinfo[ 'videos']['favorited'][counti]['url'].replace( 'http://motherless.com', '' ) + "\"><img src=\"" + getpyurlinfo['videos']['favorited'][ counti]['thumbnail'] + "\" alt=\"" + getpyurlinfo[ 'videos']['favorited'][counti][ 'title'] + "\" title=\"" + getpyurlinfo[ 'videos']['favorited'][counti][ 'title'] + "\" /></a>\n" counti = counti + 1 IndexHTMLCode = IndexHTMLCode + "<div><br /> <br /></div>\n" counti = 0 while (counti < 15): IndexHTMLCode = IndexHTMLCode + " <a href=\"" + getpyurlinfo[ 'videos']['viewed'][counti]['url'].replace( 'http://motherless.com', '' ) + "\"><img src=\"" + getpyurlinfo['videos']['viewed'][ counti]['thumbnail'] + "\" alt=\"" + getpyurlinfo[ 'videos']['viewed'][counti][ 'title'] + "\" title=\"" + getpyurlinfo[ 'videos']['viewed'][counti][ 'title'] + "\" /></a>\n" counti = counti + 1 IndexHTMLCode = IndexHTMLCode + "<div><br /> <br /></div>\n" counti = 0 while (counti < 15): IndexHTMLCode = IndexHTMLCode + " <a href=\"" + getpyurlinfo[ 'videos']['commented'][counti]['url'].replace( 'http://motherless.com', '' ) + "\"><img src=\"" + getpyurlinfo['videos']['commented'][ counti]['thumbnail'] + "\" alt=\"" + getpyurlinfo[ 'videos']['commented'][counti][ 'title'] + "\" title=\"" + getpyurlinfo[ 'videos']['commented'][counti][ 'title'] + "\" /></a>\n" counti = counti + 1 IndexHTMLCode = IndexHTMLCode + "<div><br /> <br /></div>\n" counti = 0 while (counti < 15): IndexHTMLCode = IndexHTMLCode + " <a href=\"" + getpyurlinfo[ 'videos']['popular'][counti]['url'].replace( 'http://motherless.com', '' ) + "\"><img src=\"" + getpyurlinfo['videos']['popular'][ counti]['thumbnail'] + "\" alt=\"" + getpyurlinfo[ 'videos']['popular'][counti][ 'title'] + "\" title=\"" + getpyurlinfo[ 'videos']['popular'][counti][ 'title'] + "\" /></a>\n" counti = counti + 1 IndexHTMLCode = IndexHTMLCode + "<div><br /> <br /></div>\n" counti = 0 while (counti < 15): IndexHTMLCode = IndexHTMLCode + " <a href=\"" + getpyurlinfo[ 'videos']['live'][counti]['url'].replace( 'http://motherless.com', '' ) + "\"><img src=\"" + getpyurlinfo['videos']['live'][ counti]['thumbnail'] + "\" alt=\"" + getpyurlinfo[ 'videos']['live'][counti][ 'title'] + "\" title=\"" + getpyurlinfo[ 'videos']['live'][counti][ 'title'] + "\" /></a>\n" counti = counti + 1 IndexHTMLCode = IndexHTMLCode + "<div><br /> <br /></div>\n" counti = 0 while (counti < 15): IndexHTMLCode = IndexHTMLCode + " <a href=\"" + getpyurlinfo[ 'videos']['random'][counti]['url'].replace( 'http://motherless.com', '' ) + "\"><img src=\"" + getpyurlinfo['videos']['random'][ counti]['thumbnail'] + "\" alt=\"" + getpyurlinfo[ 'videos']['random'][counti][ 'title'] + "\" title=\"" + getpyurlinfo[ 'videos']['random'][counti][ 'title'] + "\" /></a>\n" counti = counti + 1 if (pymotherlessinfo['motherlessinfo'] == "sample-images"): IndexHTMLCode = "" getpyurlinfo = pymotherless.get_motherless_sample_links( geturls_headers, geturls_cj, numoflinks=15, urltype="image") counti = 0 while (counti < 15): IndexHTMLCode = IndexHTMLCode + " <a href=\"" + getpyurlinfo[ 'images']['recent'][counti]['url'].replace( 'http://motherless.com', '' ) + "\"><img src=\"" + getpyurlinfo['images']['recent'][ counti]['thumbnail'] + "\" alt=\"" + getpyurlinfo[ 'images']['recent'][counti][ 'title'] + "\" title=\"" + getpyurlinfo[ 'images']['recent'][counti][ 'title'] + "\" /></a>\n" counti = counti + 1 IndexHTMLCode = IndexHTMLCode + "<div><br /> <br /></div>\n" counti = 0 while (counti < 15): IndexHTMLCode = IndexHTMLCode + " <a href=\"" + getpyurlinfo[ 'images']['favorited'][counti]['url'].replace( 'http://motherless.com', '' ) + "\"><img src=\"" + getpyurlinfo['images']['favorited'][ counti]['thumbnail'] + "\" alt=\"" + getpyurlinfo[ 'images']['favorited'][counti][ 'title'] + "\" title=\"" + getpyurlinfo[ 'images']['favorited'][counti][ 'title'] + "\" /></a>\n" counti = counti + 1 IndexHTMLCode = IndexHTMLCode + "<div><br /> <br /></div>\n" counti = 0 while (counti < 15): IndexHTMLCode = IndexHTMLCode + " <a href=\"" + getpyurlinfo[ 'images']['viewed'][counti]['url'].replace( 'http://motherless.com', '' ) + "\"><img src=\"" + getpyurlinfo['images']['viewed'][ counti]['thumbnail'] + "\" alt=\"" + getpyurlinfo[ 'images']['viewed'][counti][ 'title'] + "\" title=\"" + getpyurlinfo[ 'images']['viewed'][counti][ 'title'] + "\" /></a>\n" counti = counti + 1 IndexHTMLCode = IndexHTMLCode + "<div><br /> <br /></div>\n" counti = 0 while (counti < 15): IndexHTMLCode = IndexHTMLCode + " <a href=\"" + getpyurlinfo[ 'images']['commented'][counti]['url'].replace( 'http://motherless.com', '' ) + "\"><img src=\"" + getpyurlinfo['images']['commented'][ counti]['thumbnail'] + "\" alt=\"" + getpyurlinfo[ 'images']['commented'][counti][ 'title'] + "\" title=\"" + getpyurlinfo[ 'images']['commented'][counti][ 'title'] + "\" /></a>\n" counti = counti + 1 IndexHTMLCode = IndexHTMLCode + "<div><br /> <br /></div>\n" counti = 0 while (counti < 15): IndexHTMLCode = IndexHTMLCode + " <a href=\"" + getpyurlinfo[ 'images']['popular'][counti]['url'].replace( 'http://motherless.com', '' ) + "\"><img src=\"" + getpyurlinfo['images']['popular'][ counti]['thumbnail'] + "\" alt=\"" + getpyurlinfo[ 'images']['popular'][counti][ 'title'] + "\" title=\"" + getpyurlinfo[ 'images']['popular'][counti][ 'title'] + "\" /></a>\n" counti = counti + 1 IndexHTMLCode = IndexHTMLCode + "<div><br /> <br /></div>\n" counti = 0 while (counti < 15): IndexHTMLCode = IndexHTMLCode + " <a href=\"" + getpyurlinfo[ 'images']['live'][counti]['url'].replace( 'http://motherless.com', '' ) + "\"><img src=\"" + getpyurlinfo['images']['live'][ counti]['thumbnail'] + "\" alt=\"" + getpyurlinfo[ 'images']['live'][counti][ 'title'] + "\" title=\"" + getpyurlinfo[ 'images']['live'][counti][ 'title'] + "\" /></a>\n" counti = counti + 1 IndexHTMLCode = IndexHTMLCode + "<div><br /> <br /></div>\n" counti = 0 while (counti < 15): IndexHTMLCode = IndexHTMLCode + " <a href=\"" + getpyurlinfo[ 'images']['random'][counti]['url'].replace( 'http://motherless.com', '' ) + "\"><img src=\"" + getpyurlinfo['images']['random'][ counti]['thumbnail'] + "\" alt=\"" + getpyurlinfo[ 'images']['random'][counti][ 'title'] + "\" title=\"" + getpyurlinfo[ 'images']['random'][counti][ 'title'] + "\" /></a>\n" counti = counti + 1 if (pymotherlessinfo['motherlessinfo'] == "gallery"): IndexHTMLCode = "" try: getpage = int(cherrypy.request.params.get('page', None)) except TypeError: getpage = 1 except ValueError: getpage = 1 getpyurlinfo = pymotherless.get_motherless_galleries_links( getpymotherless, geturls_headers, geturls_cj, page=getpage) counti = 0 maxi = getpyurlinfo['numoflinks'] while (counti < maxi): IndexHTMLCode = IndexHTMLCode + " <a href=\"" + getpyurlinfo[ counti]['url'].replace( 'http://motherless.com', '') + "\"><img src=\"" + getpyurlinfo[counti][ 'thumbnail'] + "\" alt=\"" + getpyurlinfo[counti][ 'title'] + "\" title=\"" + getpyurlinfo[ counti]['title'] + "\" /></a>\n" counti = counti + 1 IndexHTMLCode = IndexHTMLCode + "<div><br /> <br /></div>\n" counti = 1 maxi = getpyurlinfo['pages'] print((str(maxi))) while (counti < maxi): IndexHTMLCode = IndexHTMLCode + " <a href=\"?page=" + str( counti) + "\">" + str(counti) + "</a>\n" counti = counti + 1 if (pymotherlessinfo['motherlessinfo'] == "group"): IndexHTMLCode = "" try: getpage = int(cherrypy.request.params.get('page', None)) except TypeError: getpage = 1 except ValueError: getpage = 1 getpyurlinfo = pymotherless.get_motherless_groups(getpymotherless, geturls_headers, geturls_cj, page=getpage) counti = 0 maxi = getpyurlinfo['numoflinks'] while (counti < maxi): IndexHTMLCode = IndexHTMLCode + " <a href=\"" + getpyurlinfo[ counti]['url'].replace( 'http://motherless.com', '') + "\"><img src=\"" + getpyurlinfo[counti][ 'thumbnail'] + "\" alt=\"" + getpyurlinfo[counti][ 'title'] + "\" title=\"" + getpyurlinfo[ counti]['title'] + "\" /></a>\n" counti = counti + 1 IndexHTMLCode = IndexHTMLCode + "<div><br /> <br /></div>\n" counti = 1 maxi = getpyurlinfo['pages'] print((str(maxi))) while (counti < maxi): IndexHTMLCode = IndexHTMLCode + " <a href=\"?page=" + str( counti) + "\">" + str(counti) + "</a>\n" counti = counti + 1 if (pymotherlessinfo['motherlessinfo'] == "member"): IndexHTMLCode = "" try: getpage = int(cherrypy.request.params.get('page', None)) except TypeError: getpage = 1 except ValueError: getpage = 1 getpyurlinfo = pymotherless.get_motherless_search_members( getpymotherless, geturls_headers, geturls_cj, page=getpage) counti = 0 maxi = getpyurlinfo['numoflinks'] while (counti < maxi): IndexHTMLCode = IndexHTMLCode + " <a href=\"" + getpyurlinfo[ counti]['url'].replace( 'http://motherless.com', '') + "\"><img src=\"" + getpyurlinfo[counti][ 'avatarurl'] + "\" alt=\"" + getpyurlinfo[counti][ 'username'] + "\" title=\"" + getpyurlinfo[ counti]['username'] + "\" /></a>\n" counti = counti + 1 IndexHTMLCode = IndexHTMLCode + "<div><br /> <br /></div>\n" counti = 1 maxi = getpyurlinfo['pages'] print((str(maxi))) while (counti < maxi): IndexHTMLCode = IndexHTMLCode + " <a href=\"?page=" + str( counti) + "\">" + str(counti) + "</a>\n" counti = counti + 1 if (pymotherlessinfo['motherlessinfo'] == "link"): IndexHTMLCode = "" getpyurlinfo = pymotherless.get_motherless_links( getpymotherless, geturls_headers, geturls_cj) if (getpyurlinfo['type'] == "images"): IndexHTMLCode = "<img src=\"" + getpyurlinfo[ 'url'] + "\" alt=\"" + getpyurlinfo[ 'title'] + "\" title=\"" + getpyurlinfo[ 'title'] + "\" style=\"width: " + str( getpyurlinfo['width']) + "px; height: " + str( getpyurlinfo['height']) + "px;\" />" if (getpyurlinfo['type'] == "videos"): IndexHTMLCode = "<video width=\"632\" height=\"432\" controls><source src=\"" + getpyurlinfo[ 'url'] + "\" type=\"video/mp4\">Your browser does not support the video tag.</video>" IndexHTMLCode = IndexHTMLCode + "<div><br /> <br /></div>\n" getpyurlcomet = pymotherless.get_motherless_links_comments( getpymotherless, geturls_headers, geturls_cj) counti = 0 maxi = getpyurlcomet['numofallposts'] while (counti < maxi): IndexHTMLCode = IndexHTMLCode + "<fieldset><legend>" + getpyurlcomet[ counti]['username'] + "</legend><img src=\"" + getpyurlcomet[ counti]['avatarurl'] + "\" alt=\"" + getpyurlcomet[ counti]['username'] + "\" title=\"" + getpyurlcomet[ counti][ 'username'] + "\" /><br />" + getpyurlcomet[ counti]['post'] + "</fieldset>" counti = counti + 1 return IndexHTMLCode
def default(self, *args, **kwargs): cherrypy.response.headers['Content-Type'] = 'text/html; charset=UTF-8'; getpyurlpath = urlparse.urlparse(cherrypy.url()).path; getpymotherless = "http://motherless.com"+getpyurlpath; pymotherlessinfo = pymotherless.get_motherless_link_type_alt(getpymotherless); IndexHTMLCode = getpyurlpath+" - "+pymotherlessinfo['motherlessinfo']; if(pymotherlessinfo['motherlessinfo']=="sample" or pymotherlessinfo['motherlessinfo']=="sample-videos"): IndexHTMLCode = ""; getpyurlinfo = pymotherless.get_motherless_sample_links(geturls_headers, geturls_cj, numoflinks=15, urltype="video"); counti = 0; while(counti<15): IndexHTMLCode = IndexHTMLCode+" <a href=\""+getpyurlinfo['videos']['recent'][counti]['url'].replace('http://motherless.com', '')+"\"><img src=\""+getpyurlinfo['videos']['recent'][counti]['thumbnail']+"\" alt=\""+getpyurlinfo['videos']['recent'][counti]['title']+"\" title=\""+getpyurlinfo['videos']['recent'][counti]['title']+"\" /></a>\n"; counti = counti + 1; IndexHTMLCode = IndexHTMLCode+"<div><br /> <br /></div>\n"; counti = 0; while(counti<15): IndexHTMLCode = IndexHTMLCode+" <a href=\""+getpyurlinfo['videos']['favorited'][counti]['url'].replace('http://motherless.com', '')+"\"><img src=\""+getpyurlinfo['videos']['favorited'][counti]['thumbnail']+"\" alt=\""+getpyurlinfo['videos']['favorited'][counti]['title']+"\" title=\""+getpyurlinfo['videos']['favorited'][counti]['title']+"\" /></a>\n"; counti = counti + 1; IndexHTMLCode = IndexHTMLCode+"<div><br /> <br /></div>\n"; counti = 0; while(counti<15): IndexHTMLCode = IndexHTMLCode+" <a href=\""+getpyurlinfo['videos']['viewed'][counti]['url'].replace('http://motherless.com', '')+"\"><img src=\""+getpyurlinfo['videos']['viewed'][counti]['thumbnail']+"\" alt=\""+getpyurlinfo['videos']['viewed'][counti]['title']+"\" title=\""+getpyurlinfo['videos']['viewed'][counti]['title']+"\" /></a>\n"; counti = counti + 1; IndexHTMLCode = IndexHTMLCode+"<div><br /> <br /></div>\n"; counti = 0; while(counti<15): IndexHTMLCode = IndexHTMLCode+" <a href=\""+getpyurlinfo['videos']['commented'][counti]['url'].replace('http://motherless.com', '')+"\"><img src=\""+getpyurlinfo['videos']['commented'][counti]['thumbnail']+"\" alt=\""+getpyurlinfo['videos']['commented'][counti]['title']+"\" title=\""+getpyurlinfo['videos']['commented'][counti]['title']+"\" /></a>\n"; counti = counti + 1; IndexHTMLCode = IndexHTMLCode+"<div><br /> <br /></div>\n"; counti = 0; while(counti<15): IndexHTMLCode = IndexHTMLCode+" <a href=\""+getpyurlinfo['videos']['popular'][counti]['url'].replace('http://motherless.com', '')+"\"><img src=\""+getpyurlinfo['videos']['popular'][counti]['thumbnail']+"\" alt=\""+getpyurlinfo['videos']['popular'][counti]['title']+"\" title=\""+getpyurlinfo['videos']['popular'][counti]['title']+"\" /></a>\n"; counti = counti + 1; IndexHTMLCode = IndexHTMLCode+"<div><br /> <br /></div>\n"; counti = 0; while(counti<15): IndexHTMLCode = IndexHTMLCode+" <a href=\""+getpyurlinfo['videos']['live'][counti]['url'].replace('http://motherless.com', '')+"\"><img src=\""+getpyurlinfo['videos']['live'][counti]['thumbnail']+"\" alt=\""+getpyurlinfo['videos']['live'][counti]['title']+"\" title=\""+getpyurlinfo['videos']['live'][counti]['title']+"\" /></a>\n"; counti = counti + 1; IndexHTMLCode = IndexHTMLCode+"<div><br /> <br /></div>\n"; counti = 0; while(counti<15): IndexHTMLCode = IndexHTMLCode+" <a href=\""+getpyurlinfo['videos']['random'][counti]['url'].replace('http://motherless.com', '')+"\"><img src=\""+getpyurlinfo['videos']['random'][counti]['thumbnail']+"\" alt=\""+getpyurlinfo['videos']['random'][counti]['title']+"\" title=\""+getpyurlinfo['videos']['random'][counti]['title']+"\" /></a>\n"; counti = counti + 1; if(pymotherlessinfo['motherlessinfo']=="sample-images"): IndexHTMLCode = ""; getpyurlinfo = pymotherless.get_motherless_sample_links(geturls_headers, geturls_cj, numoflinks=15, urltype="image"); counti = 0; while(counti<15): IndexHTMLCode = IndexHTMLCode+" <a href=\""+getpyurlinfo['images']['recent'][counti]['url'].replace('http://motherless.com', '')+"\"><img src=\""+getpyurlinfo['images']['recent'][counti]['thumbnail']+"\" alt=\""+getpyurlinfo['images']['recent'][counti]['title']+"\" title=\""+getpyurlinfo['images']['recent'][counti]['title']+"\" /></a>\n"; counti = counti + 1; IndexHTMLCode = IndexHTMLCode+"<div><br /> <br /></div>\n"; counti = 0; while(counti<15): IndexHTMLCode = IndexHTMLCode+" <a href=\""+getpyurlinfo['images']['favorited'][counti]['url'].replace('http://motherless.com', '')+"\"><img src=\""+getpyurlinfo['images']['favorited'][counti]['thumbnail']+"\" alt=\""+getpyurlinfo['images']['favorited'][counti]['title']+"\" title=\""+getpyurlinfo['images']['favorited'][counti]['title']+"\" /></a>\n"; counti = counti + 1; IndexHTMLCode = IndexHTMLCode+"<div><br /> <br /></div>\n"; counti = 0; while(counti<15): IndexHTMLCode = IndexHTMLCode+" <a href=\""+getpyurlinfo['images']['viewed'][counti]['url'].replace('http://motherless.com', '')+"\"><img src=\""+getpyurlinfo['images']['viewed'][counti]['thumbnail']+"\" alt=\""+getpyurlinfo['images']['viewed'][counti]['title']+"\" title=\""+getpyurlinfo['images']['viewed'][counti]['title']+"\" /></a>\n"; counti = counti + 1; IndexHTMLCode = IndexHTMLCode+"<div><br /> <br /></div>\n"; counti = 0; while(counti<15): IndexHTMLCode = IndexHTMLCode+" <a href=\""+getpyurlinfo['images']['commented'][counti]['url'].replace('http://motherless.com', '')+"\"><img src=\""+getpyurlinfo['images']['commented'][counti]['thumbnail']+"\" alt=\""+getpyurlinfo['images']['commented'][counti]['title']+"\" title=\""+getpyurlinfo['images']['commented'][counti]['title']+"\" /></a>\n"; counti = counti + 1; IndexHTMLCode = IndexHTMLCode+"<div><br /> <br /></div>\n"; counti = 0; while(counti<15): IndexHTMLCode = IndexHTMLCode+" <a href=\""+getpyurlinfo['images']['popular'][counti]['url'].replace('http://motherless.com', '')+"\"><img src=\""+getpyurlinfo['images']['popular'][counti]['thumbnail']+"\" alt=\""+getpyurlinfo['images']['popular'][counti]['title']+"\" title=\""+getpyurlinfo['images']['popular'][counti]['title']+"\" /></a>\n"; counti = counti + 1; IndexHTMLCode = IndexHTMLCode+"<div><br /> <br /></div>\n"; counti = 0; while(counti<15): IndexHTMLCode = IndexHTMLCode+" <a href=\""+getpyurlinfo['images']['live'][counti]['url'].replace('http://motherless.com', '')+"\"><img src=\""+getpyurlinfo['images']['live'][counti]['thumbnail']+"\" alt=\""+getpyurlinfo['images']['live'][counti]['title']+"\" title=\""+getpyurlinfo['images']['live'][counti]['title']+"\" /></a>\n"; counti = counti + 1; IndexHTMLCode = IndexHTMLCode+"<div><br /> <br /></div>\n"; counti = 0; while(counti<15): IndexHTMLCode = IndexHTMLCode+" <a href=\""+getpyurlinfo['images']['random'][counti]['url'].replace('http://motherless.com', '')+"\"><img src=\""+getpyurlinfo['images']['random'][counti]['thumbnail']+"\" alt=\""+getpyurlinfo['images']['random'][counti]['title']+"\" title=\""+getpyurlinfo['images']['random'][counti]['title']+"\" /></a>\n"; counti = counti + 1; if(pymotherlessinfo['motherlessinfo']=="gallery"): IndexHTMLCode = ""; try: getpage=int(cherrypy.request.params.get('page', None)); except TypeError: getpage=1; except ValueError: getpage=1; getpyurlinfo = pymotherless.get_motherless_galleries_links(getpymotherless, geturls_headers, geturls_cj, page=getpage); counti = 0; maxi = getpyurlinfo['numoflinks']; while(counti<maxi): IndexHTMLCode = IndexHTMLCode+" <a href=\""+getpyurlinfo[counti]['url'].replace('http://motherless.com', '')+"\"><img src=\""+getpyurlinfo[counti]['thumbnail']+"\" alt=\""+getpyurlinfo[counti]['title']+"\" title=\""+getpyurlinfo[counti]['title']+"\" /></a>\n"; counti = counti + 1; IndexHTMLCode = IndexHTMLCode+"<div><br /> <br /></div>\n"; counti = 1; maxi = getpyurlinfo['pages']; print(str(maxi)); while(counti<maxi): IndexHTMLCode = IndexHTMLCode+" <a href=\"?page="+str(counti)+"\">"+str(counti)+"</a>\n"; counti = counti + 1; if(pymotherlessinfo['motherlessinfo']=="group"): IndexHTMLCode = ""; try: getpage=int(cherrypy.request.params.get('page', None)); except TypeError: getpage=1; except ValueError: getpage=1; getpyurlinfo = pymotherless.get_motherless_groups(getpymotherless, geturls_headers, geturls_cj, page=getpage); counti = 0; maxi = getpyurlinfo['numoflinks']; while(counti<maxi): IndexHTMLCode = IndexHTMLCode+" <a href=\""+getpyurlinfo[counti]['url'].replace('http://motherless.com', '')+"\"><img src=\""+getpyurlinfo[counti]['thumbnail']+"\" alt=\""+getpyurlinfo[counti]['title']+"\" title=\""+getpyurlinfo[counti]['title']+"\" /></a>\n"; counti = counti + 1; IndexHTMLCode = IndexHTMLCode+"<div><br /> <br /></div>\n"; counti = 1; maxi = getpyurlinfo['pages']; print(str(maxi)); while(counti<maxi): IndexHTMLCode = IndexHTMLCode+" <a href=\"?page="+str(counti)+"\">"+str(counti)+"</a>\n"; counti = counti + 1; if(pymotherlessinfo['motherlessinfo']=="member"): IndexHTMLCode = ""; try: getpage=int(cherrypy.request.params.get('page', None)); except TypeError: getpage=1; except ValueError: getpage=1; getpyurlinfo = pymotherless.get_motherless_search_members(getpymotherless, geturls_headers, geturls_cj, page=getpage); counti = 0; maxi = getpyurlinfo['numoflinks']; while(counti<maxi): IndexHTMLCode = IndexHTMLCode+" <a href=\""+getpyurlinfo[counti]['url'].replace('http://motherless.com', '')+"\"><img src=\""+getpyurlinfo[counti]['avatarurl']+"\" alt=\""+getpyurlinfo[counti]['username']+"\" title=\""+getpyurlinfo[counti]['username']+"\" /></a>\n"; counti = counti + 1; IndexHTMLCode = IndexHTMLCode+"<div><br /> <br /></div>\n"; counti = 1; maxi = getpyurlinfo['pages']; print(str(maxi)); while(counti<maxi): IndexHTMLCode = IndexHTMLCode+" <a href=\"?page="+str(counti)+"\">"+str(counti)+"</a>\n"; counti = counti + 1; if(pymotherlessinfo['motherlessinfo']=="link"): IndexHTMLCode = ""; getpyurlinfo = pymotherless.get_motherless_links(getpymotherless, geturls_headers, geturls_cj); if(getpyurlinfo['type']=="images"): IndexHTMLCode = "<img src=\""+getpyurlinfo['url']+"\" alt=\""+getpyurlinfo['title']+"\" title=\""+getpyurlinfo['title']+"\" style=\"width: "+str(getpyurlinfo['width'])+"px; height: "+str(getpyurlinfo['height'])+"px;\" />"; if(getpyurlinfo['type']=="videos"): IndexHTMLCode = "<video width=\"632\" height=\"432\" controls><source src=\""+getpyurlinfo['url']+"\" type=\"video/mp4\">Your browser does not support the video tag.</video>"; IndexHTMLCode = IndexHTMLCode+"<div><br /> <br /></div>\n"; getpyurlcomet = pymotherless.get_motherless_links_comments(getpymotherless, geturls_headers, geturls_cj); counti = 0; maxi = getpyurlcomet['numofallposts']; while(counti<maxi): IndexHTMLCode = IndexHTMLCode+"<fieldset><legend>"+getpyurlcomet[counti]['username']+"</legend><img src=\""+getpyurlcomet[counti]['avatarurl']+"\" alt=\""+getpyurlcomet[counti]['username']+"\" title=\""+getpyurlcomet[counti]['username']+"\" /><br />"+getpyurlcomet[counti]['post']+"</fieldset>"; counti = counti + 1; return IndexHTMLCode;