开发者

Simple program to automate mouse and keyboard movements

开发者 https://www.devze.com 2023-03-02 13:28 出处:网络
Background: I check my grades weekly online for school. I then use print-screen and ms paint to saveimages of the website with my grades. (I know this is really time consuming and inefficient,but my

Background:

I check my grades weekly online for school. I then use print-screen and ms paint to save images of the website with my grades. (I know this is really time consuming and inefficient, but my computer has connectivity problems with my printer and it doesn't recognize any PDF makers)

Possible Solution:

Write some program or something that automatically:

  1. ope开发者_如何学Cns a browser
  2. goes to the website
  3. logs in
  4. opens each individual subject
  5. creates an image (idc what process it uses to do so)

Thanks E'rybody


Don't use a browser. send Http requests in perl or something like that.

You can simply parse the HTML instead of grabbing screenshots.

Alternatively ask the school to provide your grades via email or on bloddy paper?


Personally I'd go with curl from the command line and then parse the html you get back:

curl http://website.com/grades

However, if you need to do it through a web browser (they might have some funky javascript) then there's a framework called selenium which might be usable: http://seleniumhq.org/

It's generally used for testing but can be used for your scenario. It's got clients for lots of different languages too.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号