当前位置: 动力学知识库 > 问答 > 编程问答 >

python - auto-Writing/auto-Inputting application for a lousy routine web-based submitions?

问题描述:

I've started learning python for a week, as always love to learn as much languages as I can ; as python is one of the easiest languages, but still there's lots of things teachers won't tell.

Interacting with web pages is an obvious example; registration in forums and other websites gives a headache, so building a simple python application that just can READ LABELS, and input INFORMATION such as First Name, Last Name, Sex, and Address in their TEXT BOXES, then Submit the page at the end would be fantastic.

Another silly thing, but I MUST know, is how to contact a website first.

If you can provide me with any tips, or help, I appreciate your contribution.

网友答案:

For a simply contacting the website, consider the requests or twill libraries. For screen-scraping, BeautifulSoup is your friend.

If third-party libraries really aren't an option, though, you'll need to delve into the htmllib, httplib, urllib, and urllib2 Python modules.

分享给朋友:
您可能感兴趣的文章:
随机阅读: