Home Technical Talk

Polycount - Filter out non-attached images and those that have attachments?

polycounter lvl 12
Offline / Send Message
Ace-Angel polycounter lvl 12
Hey to all,

I was wondering if there is an easier way to navigate the WAYWO threads on PC?

Basically, I would like to make it so that I only see posts that have their own attachments/links/images in them and not replies. Kinda like a 'gallery' mode if you will?

I tried changing around the display mode, but it's not what I'm looking for since they still show sub replies.

Again, I guess what I'm asking for is an easy way to get an all out 'gallery' mode kinda thing for the images only in the threads, kinda like an archive thing? Especially among the hundreds of images in WAYWO thread.

Cheers!

Replies

  • haiddasalami
    Offline / Send Message
    haiddasalami polycounter lvl 14
    Might want to talk to luke and see if he can add a waywo link. Example: http://conceptroot.com/pcfeed/
  • monster
    Offline / Send Message
    monster polycounter
    There's this, but it's the entire PnP forum.

    http://www.conceptroot.com/pcfeed/

    [edit]Too slow![/edit]
  • haiddasalami
    Offline / Send Message
    haiddasalami polycounter lvl 14
    Some fun python stuff I was playing around with. Just prints links for now. Also this would be pretty slow if someone had to do entire waywo haha
    import urllib2
    import re
    
    url = "http://www.polycount.com/forum/showthread.php?t=115151&page=137"
    urlSource = urllib2.urlopen(url).read()
    imgUrls = re.findall('img .*?src="(.*?)"', urlSource)
    # download all images
    for imgUrl in imgUrls:
        try:
            if imgUrl.startswith("http://"):
                print imgUrl
        except:
            print("FAILED")
            pass
    
  • Ace-Angel
    Offline / Send Message
    Ace-Angel polycounter lvl 12
    Hey guys!

    Much appreciated, didn't know about that awesome link, cheers!

    However I forgot to mention that I would like to do that to also older WAYWO thread (or specific threads). CR seems to limit itself to about 3 months of content per stack.

    It's still an awesome site, mind you, up in my bookmarks now!

    @Haid: I'm not too well versed in Prog. Lingo, but if I understood you correctly, that code will parse out link to all the images in the thread?
  • haiddasalami
    Offline / Send Message
    haiddasalami polycounter lvl 14
    Yup. Just made a quick example of taking the image links and outputting them to an html file
    import urllib2
    import re
    
    url = "http://www.polycount.com/forum/showthread.php?t=115151&page=137"
    urlSource = urllib2.urlopen(url).read()
    imgUrls = re.findall('img .*?src="(.*?)"', urlSource)
    removeDupUrls = []
    [removeDupUrls.append(i) for i in imgUrls if not removeDupUrls.count(i)]
    # download all images
    list = []
    for imgUrl in removeDupUrls:
        try:
            if imgUrl.startswith("http://") and imgUrl.find("polycount") == -1 and imgUrl.find("skype") == -1:
                list.append(imgUrl)
        except:
            pass
    
    indexFile = open('C:/Users/Alistair Braz/Dropbox/Public/PolycountImageTest/test.html','w')
    for line in list:
        output = "<p><img src = \"%s\"></p>" % (line)
        indexFile.write(output)
    
    indexFile.close()
    

    which results in this. Interesting that theres skype icons but i dont see them o.O Might look into better ways to parse the html though hopefully i wont get bored halfway through haha.

    Edit: just realized i forgot to check for quotes XD. Changed that haha
  • Ace-Angel
    Offline / Send Message
    Ace-Angel polycounter lvl 12
Sign In or Register to comment.