3
다음 코드를 사용하여 RSS를 읽습니다. Atom 피드, RSS를 찾는 방법이 있습니까 | 블로그 피드의 ATOM URL (예 : for http://my.typepad.com or http://occupylosangeles.org/
). 이는 google.com/reader의 기능과 유사해야합니다.블로그 사이트에서 프로그래밍 방식으로 블로그 피드 URL을 찾는 방법
import com.sun.syndication.feed.atom.Feed;
import com.sun.syndication.feed.module.Module;
import com.sun.syndication.feed.synd.SyndCategory;
import com.sun.syndication.feed.synd.SyndContent;
import com.sun.syndication.feed.synd.SyndEntry;
import com.sun.syndication.feed.synd.SyndFeed;
import com.sun.syndication.feed.synd.SyndFeedImpl;
import com.sun.syndication.fetcher.FeedFetcher;
import com.sun.syndication.fetcher.FetcherEvent;
import com.sun.syndication.fetcher.FetcherListener;
import com.sun.syndication.fetcher.impl.FeedFetcherCache;
import com.sun.syndication.fetcher.impl.HashMapFeedInfoCache;
import com.sun.syndication.fetcher.impl.HttpURLFeedFetcher;
import com.sun.syndication.io.SyndFeedInput;
import com.sun.syndication.io.XmlReader;
FeedFetcher fetcher = new HttpURLFeedFetcher(feedInfoCache);
// register listener to feed
FetcherEventListenerImpl listener = new FetcherEventListenerImpl();
fetcher.addFetcherEventListener(listener);
// Mechanism to read feeds via Rome Fetcher
SyndFeed feed = fetcher.retrieveFeed(new URL(feedURL));
이 서비스를 사용하려면 등록 된 응용 프로그램 키가 필요합니까? 아니면 완전히 무료입니까? 또한'number of requests'count에 대한 세부 정보를 찾을 수 없습니다. API가 폐지 되었습니까? –