用形式方法的动态生成表的R Web刮擦=“ post”
在网络刮擦方面,我非常新手。
我正在尝试对我工作的一些公共薪水信息进行一些探索性分析。他们有一个网站,但是试图从中获取任何信息真是太糟糕了(几乎就像他们故意这样做一样……)。在R中阅读Web刮擦教程的一些介绍,我认为这是一个嵌入式表。格式看起来像是来自Tableau。
阅读这篇文章后,我也认为它是动态的,因为打开网页时没有立即生成表。当我检查网页时,它具有表单方法=“ post”,这似乎使事情变得更加困难。
如果网站在后端加载产品,但尚未为公众发布,我可以访问该信息吗?
由于这篇文章,我想我需要使用包装httr的邮政请求。但是尝试阅读这一点是使我的头旋转。 https://f.briatte.org/r/scraping-form--r/scraping-form-----结果与httr
现在我只是意识到“所有校园”默认值很好。我可以稍后在R中过滤。因此,我只需要用HTTR推动“搜索”即可。
有什么方法可以刮擦此信息吗?如果有可能在那里做,我的r最流利。
我试图刮擦的网站:
I am extremely novice when it comes to web scraping.
I am trying to do some exploratory analytics on some public base salary information where I work. They have a website, but it is awful trying to get any information out of it (almost like they did it on purpose...). Reading some intro to web scraping tutorials in R, I think this is an embedded table; the formatting looks like it is from Tableau.
After reading this post, I also think it is dynamic since the table isn't generated right away when the webpage is opened. When I inspect the webpage it has a form method="post" and that seems to make things harder from the little bit of reading I have done.
Due to this post, I think I need to use the package httr for a post request. But trying to read through this is making my head spin.
https://f.briatte.org/r/scraping-form-results-with-httr
Now I am just realizing "All Campuses" the default is fine; I can filter later in R. So I just need to push the "Search" with httr.
Is there any way to scrape this information? I am most fluent in R if it is possible to do it there.
The website I am trying to scrape:
https://www.cusys.edu/budget/cusalaries/
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
您可以考虑使用rselenium。这是一个示例:
You can consider using RSelenium. Here is an example :
这是可以考虑的另一种方法:
Here is another approach that can be considered :
这是您可以考虑使用R套件rselenium循环的一种方法:
Here is one approach that you can consider to loop over the pages with the R package RSelenium :