Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExtractDownloadURL ¶
ExtractDownloadURL extracts download link URL from the HTML reader
Types ¶
type ChannelElement ¶
type ChannelElement struct { // The link elements. In this bunch we're mostly interested in the "next" // links. Links []LinkElement `xml:"link"` // The actual item elements, each of which contains a single favorite // deviation. RssItems []RssItemElement `xml:"item"` }
ChannelElement is the single channel element in Deviant Art RSS xml that's located inside the root rss element.
type ItemContentElement ¶
type ItemContentElement struct { URL string `xml:"url,attr"` Width int `xml:"width,attr"` Height int `xml:"height,attr"` }
ItemContentElement in deviant art RSS xml. Example:
<media:content url="http://pre03.deviantart.net/bbec/th/pre/f/2015/347/b/f/model_no__th_x11_38_by_wojtekfus-d9k1rbm.jpg" height="670" width="1192" medium="image"/>
type ItemCreditElement ¶
ItemCreditElement is a credit element in Deviant Art RSS xml. Example: <media:credit role="author" scheme="urn:ebu">WojtekFus</media:credit>
type LinkElement ¶
type LinkElement struct { // Relation, e.g. "next". Each RSS xml contains x amount of favorite items // and then the URL in "next" contains the next RSS xml that contains more. Rel string `xml:"rel,attr"` Href string `xml:"href,attr"` }
LinkElement is a URL to another Deviant Art RSS xml
type RssElement ¶
type RssElement struct { XMLName xml.Name `xml:"rss"` // The single channel element in the xml. At least no more than one hasn't // been seen during development. Channel ChannelElement `xml:"channel"` }
RssElement is the root element of Deviant Art's RSS xml
type RssItem ¶
type RssItem struct { // I.e. the name of the deviation Title string // URL to the deviation, usually identical to GUID Link string GUID string PublicationDate string Author string URL string Dimensions Dimensions }
RssItem is a single <item> in deviant art RSS
type RssItemElement ¶
type RssItemElement struct { Title string `xml:"title"` Link string `xml:"link"` GUID string `xml:"guid"` PublicationDate string `xml:"pubDate"` URL string `xml:"url"` Width int `xml:"width"` Height int `xml:"height"` Credits []ItemCreditElement `xml:"credit"` Content ItemContentElement `xml:"content"` }
RssItemElement is a single <item> in deviant art RSS xml. Contains information on any given favorite deviation.
Example:
<item> <title>MODEL NO. TH-X11-38</title> <link>http://wojtekfus.deviantart.com/art/MODEL-NO-TH-X11-38-577869970</link> <guid isPermaLink="true">http://wojtekfus.deviantart.com/art/MODEL-NO-TH-X11-38-577869970</guid> <pubDate>Sun, 13 Dec 2015 16:14:02 PST</pubDate> <media:title type="plain">MODEL NO. TH-X11-38</media:title> <media:keywords></media:keywords> <media:rating>nonadult</media:rating> <media:category label="Sci-Fi">digitalart/paintings/scifi</media:category> <media:credit role="author" scheme="urn:ebu">WojtekFus</media:credit> <media:credit role="author" scheme="urn:ebu">http://a.deviantart.net/avatars/w/o/wojtekfus.jpg?5</media:credit> <media:copyright url="http://wojtekfus.deviantart.com">Copyright 2015 WojtekFus</media:copyright> <media:description type="html">Image done for the workshop in Taipei that's going to happen next week:&nbsp;<a class="external" href="http://www.deviantart.com/users/outgoing?http://www.likmeetup.com/">www.likmeetup.com/</a><br /><br />Struggled with it a lot myself, but I'm letting it go, haha <img src="http://e.deviantart.net/emoticons/s/smile.gif" width="15" height="15" alt=":)" data-embed-type="emoticon" data-embed-id="391" title=":) (Smile)"/> Hope you like it! Love you guys!</media:description> <media:thumbnail url="http://t02.deviantart.net/FeGyfpR_tb8vGcOarQm_dyvBd7U=/fit-in/150x150/filters:no_upscale():origin()/pre03/bbec/th/pre/f/2015/347/b/f/model_no__th_x11_38_by_wojtekfus-d9k1rbm.jpg" height="84" width="150"/> <media:thumbnail url="http://t14.deviantart.net/BPI5k4O3FXvK1PF7VJXREIujS0I=/fit-in/300x900/filters:no_upscale():origin()/pre03/bbec/th/pre/f/2015/347/b/f/model_no__th_x11_38_by_wojtekfus-d9k1rbm.jpg" height="169" width="300"/> <media:thumbnail url="http://t15.deviantart.net/ZS17sMYJv1Whk_q1lyP4DrvdH30=/300x200/filters:fixed_height(100,100):origin()/pre03/bbec/th/pre/f/2015/347/b/f/model_no__th_x11_38_by_wojtekfus-d9k1rbm.jpg" height="169" width="300"/> <media:content url="http://pre03.deviantart.net/bbec/th/pre/f/2015/347/b/f/model_no__th_x11_38_by_wojtekfus-d9k1rbm.jpg" height="670" width="1192" medium="image"/> <description>Image done for the workshop in Taipei that's going to happen next week:&nbsp;<a class="external" href="http://www.deviantart.com/users/outgoing?http://www.likmeetup.com/">www.likmeetup.com/</a><br /><br />Struggled with it a lot myself, but I'm letting it go, haha <img src="http://e.deviantart.net/emoticons/s/smile.gif" width="15" height="15" alt=":)" data-embed-type="emoticon" data-embed-id="391" title=":) (Smile)"/> Hope you like it! Love you guys!<br /><div><img src="http://t15.deviantart.net/ZS17sMYJv1Whk_q1lyP4DrvdH30=/300x200/filters:fixed_height(100,100):origin()/pre03/bbec/th/pre/f/2015/347/b/f/model_no__th_x11_38_by_wojtekfus-d9k1rbm.jpg" alt="thumbnail" /></div></description> </item>
Click to show internal directories.
Click to hide internal directories.