从网页(非HTML5或手机)获取内容? [英] Get content from webpage (non-html5 or mobile)?

查看:69
本文介绍了从网页(非HTML5或手机)获取内容?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好



我想为只有iOS和Android应用程序的新闻网站制作应用程序。通常我会访问移动网站,但是......是的,我们在2013年...没有移动网站...



所以起初我想要使用带有RSS的Windows Phone App Studio。但网站提供的RSS给出了标题,特色图片和文章介绍。要阅读完整的内容,你必须访问网站(这几乎使得
制作应用程序无效)。



所以我想我会把它带到Visual Studio Express试图从网站上获取完整的文章。但我不知道该怎么做(我是一名具有C和Java知识的PHP开发人员,但我从未在C#和Web Phone环境中做过C#。)


有谁知道它是否可以完成以及如何完成?



谢谢:)

Hello

I want to make an app for a news website that only has apps for iOS and Android. Normally I would just visit the mobile website but... yes we are in 2013... there are NO mobile website...

So at first I wanted to use the Windows Phone App Studio with the RSS. But the RSS the website offers gives the title, the featured image and an intro to the article. To read the full thing, you have to go on the website (which pretty much voids the point of making an app).

So I thought I'd take it to the Visual Studio Express to try to get the full articles from the website. But I don't know how to do that (I'm a PHP developer with knowledge in C and Java but I've never done C# especially in a Windows Phone context).

Does anyone know if it can be done and how?

Thanks :)

推荐答案

你好Dan,

我过去做过这样的事情。 这个概念是您需要解析WebSite并仅提取您想要的数据。 这可能很棘手。

I have done things like this in the past.  The concept is that you will want to parse the WebSite and extract only the data you want.  That can be tricky.

不要放弃RSS的想法。 通常,RSS源有摘要和完整文章的链接。 您可以使用RSS源显示您可能感兴趣的项目列表,然后当用户选择文章时,您可以检索完整文章的URL
并直接显示或...解析该HTML和只展示你想要的东西。

Don't abandon the RSS idea yet.  Usually the RSS feed has a summary and link to the full article.  You could use the RSS feed to present a list of items that you may be interested, then when the user selects the article you can retrieve the URL for the full article and display that directly or... Parse that HTML and display only what you want.

那里有几个HTML解析器库。 我不是在提倡另一个,但我已经成功使用了
这一个。 您应该进行自己的研究,找出最适合您需求的HTML解析器!

There are a couple of HTML parser libraries out there.  I am not advocating one over the other but I have used this one with success.  You should do your own research and find which HTML parser would fit your needs the best!

Jeff


这篇关于从网页(非HTML5或手机)获取内容?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆