Closed kupiakos closed 8 years ago
I don't know if this would help, but it seems like there are some custom FurAffinity APIs on GitHub here.
@Shugabuga Funny you mention that. I've been using this as a reference point for which CSS selectors would be best.
EDIT: I'm mostly done with the architecture of the plugin; I'm putting it all together now.
I don't know if you prefer ID or class for scraping images from CSS selectors, but here's a few noteworthy things I noticed on how FA organizes user-friendly, non-CDN pages:
#submissionImg
targets the submission image
td .cat [href*='/user/']
targets the username
#keywords
targets the tags
td .cat b
targets the post title
Here's a page with those CSS rules getting some styling...
...with this code:
#submissionImg {background-color:red} /*image*/
td .cat [href*='/user/'] {background-color:pink} /*username*/
#keywords {background-color:cyan} /*tags*/
td .cat b {background-color:yellow} /*title*/
I hope that helps in the slightest way! :)
Thanks! I'm using td.cat a
for the author, and td.cat b
for the title. I'm also designing support for reverse-lookup from the FA CDN given that it seems to be very prevalent on /r/zootopia.
That would be nice! If not, you can just take the image on the CDN page and the author from the URL using regex kinda like this (pardon my lack of regex skills):
https?://(*\.)?facdn\.net/art/<user>/*
@Shugabuga Go ahead and check out commit 00974cb if you'd like.
Will do! Thanks!
As requested by /r/zootopia.
Example for testing.