有时,您可能希望逐行读取文件中的url,并直接在http.client.httpconnection(url)等方法中使用它。为了避免错误,您需要删除每个url中的最后一个字符“\n”。所以这是一个简单的例子,程序readurlinfe.py读取名为“list”的文件中的url,并使用模块http.client将http请求集发送到这些url。(您需要手动创建一个文件,包括逐行的url)
ReadUrlInFile的Python项目详细描述
有时,您可能希望逐行读取文件中的url,并直接在http.client.httpconnection(url)等方法中使用它。为了避免错误,您需要删除每个url中的最后一个字符“\n”。所以这是一个简单的例子,程序readurlinfe.py读取名为“list”的文件中的url,并使用模块http.client将http请求集发送到这些url。(您需要手动创建一个文件,包括逐行的url)
- 此包Python名称:ReadUrlInFile
- 目前版本: ReadUrlInFile 1.2.6
- 最后维护时间:Oct 30, 2012
- 摘要:Sometimes you may want to read the URLs in a file(line by line), and use it directly in a method such like http.client.HTTPConnection(url). In order to avoid a mistake, you need to delete the last char "\n" in each URL. So this is a simple example, the programe ReadUrlInFile.py reads the URLs in a file named "list", and sends HTTP requesets to these URLs using the module http.client. (You need to manually creat a file including the URLs line by line)
- 安装命令:pip install ReadUrlInFile
- 其它:ReadUrlInFile 这个Python第三方库的作者没有提供更多的项目描述信息了,2019-11-11 22:36:34。
- 可以返回 PyPI第三方库 首页,查找更多相关Python包程序。