如何在首页上获得最佳和精选文章? [英] How to get the best and featured article on the main page?

查看:67
本文介绍了如何在首页上获得最佳和精选文章?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所有人:
我很想阅读codeproject.com主页文章.
但是我的工作很忙,我每天都看不懂这篇文章,我收到了新闻通讯",但是新闻通讯"并不是这个网站上最好的文章.

all:
I''m very like to read the codeproject.com main page article.
but my work is very busy,I can''t read the article every day ,I have receive the "Newsletter", but the "Newsletter" is not the best article on this web site.
so can I recevie the main page best article when the page content is change?

推荐答案

所以当页面内容更改时,我可以接收主页上的最佳文章吗?改变?
您的要求不是很清楚,但是您似乎只想看最好的文章.
您可以在主页底部和以下位置找到它们:最新的最佳选择 [ ^ ]
so can I recevie the main page best article when the page content is change?
What are you asking is not too clear, but it looks like you want to just look at best articles.
You can find them at the bottom of the main page and also here: Latest Best Picks[^]


有一个RSS feed:http://www.codeproject.com/webservices/articlerss.aspx
可能有帮助.
There is an RSS feed: http://www.codeproject.com/webservices/articlerss.aspx
That may help.


您可以是一名程序员,并编写像这样的应用程序- ^ ]-抓取适当的页面,并列出在过去30天内提交的,超过特定用户指定评分阈值的所有应用.

这是要抓取的页面:

http://www.codeproject.com/script/Articles/Latest.aspx?at=1 [ ^ ]

您需要抓取该页面以查明有多少种标价(它会显示"N第1页",其中"N"是文章的最后一页.要获取子页面,您要做的就是更改at=查询字符串中的值将转换为您要抓取的页码.获得文章URL列表后,您可以点击每个文章页面并抓取当前评分以查看其是否符合评分标准,然后将其显示在列表中.

将列表保存到数据文件可能不会有任何好处,因为投票会每小时将文章移至指定阈值之上和之下.

有人建议取消最新的最佳选择",但这并不总是表示最佳",因为排名靠前的高排名文章并不总是在列表中(我认为是这样)的文章与年龄有关).

完成编写应用程序后,写一篇有关它的文章.
You could be a programmer and write an app like this one - CodeProject Article Scraper, Revisited[^] - to scrape the appropriate pages, and list all apps over a certain user-specified rating threshold and that have been submitted in the last 30 days.

Here''s the page to scrape:

http://www.codeproject.com/script/Articles/Latest.aspx?at=1[^]

You need to scrape the page to find out how many poages there are (it will say "Page 1 of N" where "N" is the last page of articles. All you have to do to get subseuent pages is change the at= value in the query string to the page number you want to scrape. Once you have a list of article URLs, you can hit each article page and scrape the current rating to see if it meets your scoring criteria, and then display them in a list.

It probably wouldn''t do any good to persist the list to a data file because voting will move articles over and below the specified threshold on an hourly basis.

Someone else suggested scraping the "Latest Best Picks", but that''s not always indicative of "the best" because articles that are ranked high enough to be in the list aren''t always in the list (I think it''s article age-related).

When you get done writing your app, write an article about it.


这篇关于如何在首页上获得最佳和精选文章?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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