0

I am trying to create a web comic aggregation website using HTML 5, CSS 3, and JavaScript. I would like users to be able to view comics of different dates from different websites all in one place. After some research, it seems like I'm probably going to need to use an RSS feed to accomplish this. However, I don't fully understand the capabilities and usage of an RSS feed.

First, would it be possible to pull images from comic websites in an automated and orderly fashion using an RSS feed? Or would I need to use something else? Or would it not be possible at all? If it is possible with an RSS feed, I'm also confused somewhat about the general implementation. Would the code for the feed be in HTML, or JavaScript, or both? Would I need to use existing libraries and or APIs? Is their existing code with a similar enough function that I could use it as a starting point?

Thanks

1 Answers1

0

You are in the right direction - RSS is a standard format used to update users/readers of newly published contents.

I'm sure you've searched it already, but its Wikipedia page is quite informative. Basically, it is a standardisation and extension of xml allowing for a uniform way to distribute and read material in an automated fashion.

In the same way there are other formats, such as Atom.

So, for your purpose the main thing to understand is that you want to READ RSS feeds, rather than writing/making one (although you could make one as well - combining the comics you've found). for example, at the bottom of xkcd you can see there are two links - one for an RSS feed and another for an Atom feed. You need to find websites like that, which publish RSS/Atom feeds of comic strips and write your site to read their feed and update itself with the new content. You can maybe automate even the way your site links to feeds by using (if you find one) or creating a feed for comic feeds (so your site would lookup this feed which would contain links to other feeds which would all be appropriate for you). You could also put up a backend on a server that would fetch the feeds and update a database/databases from which the front-end would fetch the content from using one linking point, but let's stick with the technologies you've mentioned - for a client-based-website for now.

To read and parse the feeds you can look at the answer here, recommending using jFeed, a plugin for jQuery (jQuery is a very popular library for javaScript, if you don't know it)




I'm pretty sure that answers your questions, but let's address them again, dividing it down and going one by one:

would it be possible to pull images from comic websites in an automated and orderly fashion using an RSS feed?

Yes! As you can see in the feed of xkcd I've linked above, it is both possible and widely used to pull/distribute images using RSS (and Atom) feeds.

would I need to use something else?

You can use Atom, which is just a different standard, but fairly the same idea (also an extension of xml, still you can use jFeed)

would it not be possible at all?

It is possible. Do not worry. Stay calm and code away.

If it is possible with an RSS feed, I'm also confused somewhat about the general implementation. Would the code for the feed be in HTML, or JavaScript, or both?

Do not confuse the feed's code with yours. Your code should READ the feed. Not be it. The feed itself, as explained above is written in a standard form of xml called RSS (or Atom if you go with that). But that is what your code reads. For you code see next question/answer.

Would I need to use existing libraries and or APIs? Is their existing code with a similar enough function that I could use it as a starting point?

As mentioned above - you can use jQuesry and the plugin jFeed for it.

Hope that helps and is not confusing.

Community
  • 1
  • 1
et_l
  • 1,868
  • 17
  • 29
  • Thanks, that was exceedingly helpful! – user2472083 Jun 27 '16 at 19:05
  • @user2472083 Great, I'm glad. In that case please accept my answer (click the tick symbol by my answer) – et_l Jun 27 '16 at 19:53
  • Done. Also, after reading your answer and some other similar questions on different forums, I have some follow-up questions. Should I post them here, or should I make a separate question? (because they at least somewhat deviate from the original question ) – user2472083 Jun 27 '16 at 21:26
  • @user2472083 Thanks. Ummm.... I'm not sure. I tried looking in the [help center](http://stackoverflow.com/help/search) and the [meta site](http://meta.stackoverflow.com/) but didn't find a definite answer yet. I think if it's a question that is not the same - open a new one (you can link to this one to give context that is not essential but helps understand what you're doing). If it's a refinement of the same thing - edit this question. Specifically - if you don't understand how something I've written would be implemented or carried out - ask here in the comments. – et_l Jun 27 '16 at 21:52
  • Okay, I think it's different enough that I will make it a separate question. Thanks for your help – user2472083 Jun 27 '16 at 22:51