Skip to content

Commit 5874bde

Browse files
committed
修改快代理的爬取格式Bug
1 parent 1c7c47a commit 5874bde

2 files changed

Lines changed: 4 additions & 19 deletions

File tree

docker-compose.yml

Lines changed: 0 additions & 15 deletions
This file was deleted.

src/spider/spiders.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -409,10 +409,10 @@ def do_crawl(self, resp) -> List[ProxyEntity]:
409409
if i == 0:
410410
continue
411411
tds = tr.find_all('td')
412-
ip = tds[1].text
413-
port = tds[2].text
414-
proxy_cover = tds[3].text
415-
proxy_type = tds[4].text if tds[3].text != '' else 'http'
412+
ip = tds[0].text
413+
port = tds[1].text
414+
proxy_cover = tds[2].text
415+
proxy_type = tds[3].text if tds[3].text != '' else 'http'
416416
region = tds[5].text
417417
supplier = tds[6].text
418418
result.append(ProxyEntity(f'{proxy_type.lower()}://{ip}:{port}',

0 commit comments

Comments
 (0)