Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removed a case of the manual indexer pitfall #112

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions daili.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@ def get_proxys(page = 1):
#存储代理的列表
proxys_list = []
#爬取每个代理信息
for index in range(len(ip_list_info)):
for index, element in enumerate(ip_list_info):
if index % 2 == 1 and index != 1:
dom = etree.HTML(str(ip_list_info[index]))
dom = etree.HTML(str(element))
ip = dom.xpath('//td[2]')
port = dom.xpath('//td[3]')
protocol = dom.xpath('//td[6]')
Expand Down