doushan7077 2012-05-15 18:55
浏览 37

试图从大学目录中提取课程列表

I am writing a program that will allow people to make their class schedule for the following quarter. In order to do this, I need to extract all the classes available for next quarter. The way my school has their course catalog set up makes it a little hard to extract the info, but if you are able to help me automate a few commands, I think it will be easy.

Here is the university catalog: http://my.sa.ucsb.edu/public/curriculum/coursesearch.aspx You will see that you need to: - Load the page - Choose subject area from pull down - Choose quarter from pull down - Choose class level from pull down - Trigger the search button - Repeat for all subject areas From there, I have written my code so that I just save the page as $SUBJECTAREA.aspx And I have a few scripts to extract the data from it. I want to be able to trigger this script on my server, so that I can update my course list at anytime directly to the server.

My real question is how should I approach this problem? I have looked at SimpleTest, which is a php testing solution that has a browser function. Although, with the limited time I have been playing with it, I'm not sure this is the solution I want.

I think that jQuery was another choice I found online to possible do this, but I do not know enough to know for sure.

Basically I just want to know how I should go about doing this task, and maybe a resource online to get me started in that direction. I am more than capable of figuring it out once I am pointed in a certain direction.

Thanks all!

  • 写回答

1条回答 默认 最新

  • duanfei1975 2012-05-15 19:29
    关注

    You will see that you need to: - Load the page - Choose subject area from pull down - Choose quarter from pull down - Choose class level from pull down - Trigger the search button

    ie. a POST request

    And I have a few scripts to extract the data from it.

    Then all you need is the list of topics, quarters and levels, which you can get similarly from the same page.

    you need an http library - curl, http components, whatever - and a loop.

    评论

报告相同问题?

悬赏问题

  • ¥15 c语言怎么用printf(“\b \b”)与getch()实现黑框里写入与删除?
  • ¥20 怎么用dlib库的算法识别小麦病虫害
  • ¥15 华为ensp模拟器中S5700交换机在配置过程中老是反复重启
  • ¥15 java写代码遇到问题,求帮助
  • ¥15 uniapp uview http 如何实现统一的请求异常信息提示?
  • ¥15 有了解d3和topogram.js库的吗?有偿请教
  • ¥100 任意维数的K均值聚类
  • ¥15 stamps做sbas-insar,时序沉降图怎么画
  • ¥15 买了个传感器,根据商家发的代码和步骤使用但是代码报错了不会改,有没有人可以看看
  • ¥15 关于#Java#的问题,如何解决?