使用python更改站点下拉列表值

使用python更改站点下拉列表值,python,html,beautifulsoup,urllib,Python,Html,Beautifulsoup,Urllib,我正在编写一个小程序,用一个用户访问一个站点并传递,然后,在配置文件页面中,有一个带有电话号码的下拉列表,当选择一个号码时,页面会重新加载difrent数据,我试图做的是遍历下拉列表中的所有号码,并保存每个页面的一些信息 到目前为止,我所得到的只是从html中获取信息,但我不知道这些数字是如何变化的 <form action="/me/plan" id="form-active-subscriber" method="get"> <select class=

我正在编写一个小程序,用一个用户访问一个站点并传递,然后,在配置文件页面中,有一个带有电话号码的下拉列表,当选择一个号码时,页面会重新加载difrent数据,我试图做的是遍历下拉列表中的所有号码,并保存每个页面的一些信息

到目前为止,我所得到的只是从html中获取信息,但我不知道这些数字是如何变化的

    <form action="/me/plan" id="form-active-subscriber" method="get">
      <select class="span3" id="current_subscriber" name="current_subscriber">
          <option value="998473069" selected="selected">56951292575</option>
          <option value="998487400">56951231211</option>
          <option value="998473907">56951294007</option>
          <option value="998474581">56951242122</option>
          <option value="998474544">56951240563</option>
          <option value="998487484">56951232281</option>
          <option value="998474580">56951241415</option>
          <option value="998473188">56951286777</option>
    </form> 
顺便说一下,我正在使用beautifulsoup解析HTML

谢谢

我很容易用

    html = response.read()

    soup = BeautifulSoup(html)

    numbers = soup.select("option")

    for number in numbers:
        number = number["value"]
        response = self.opener.open(page+"plan?utf8=&current_subscriber="+number, None, 10)  
    html = response.read()

    soup = BeautifulSoup(html)

    numbers = soup.select("option")

    for number in numbers:
        number = number["value"]
        response = self.opener.open(page+"plan?utf8=&current_subscriber="+number, None, 10)