更改网站地址

2024-10-01 22:39:49 发布

您现在位置:Python中文网/ 问答频道 /正文

我想知道许多人的情况。 我在网站上有这些信息www.wats4u.com. . 我把这些人的名字和名字写在一份文件里

目前我有密码:

import urllib 
page = urllib.urlopenbegin('https://www.wats4u.com/annuaire-alumni?lastname=algan&firstname=michel&scholl=All&class=All&=rechercher')
strpage = page.read()
sock.close()
print htmlSource

我想要一个更像这样的代码:

page = urllib.urlopenbegin('https://www.wats4u.com/annuaire-alumni?lastname= + name + &firstname= + firstname + &scholl=All&class=All&=rechercher')

我在一个文件exel“test.xlsx”中有名字和名字(大约5000人)

我需要在代码中更改或添加什么


Tags: 文件httpscomwwwpageallurllibfirstname

热门问题