File tree Expand file tree Collapse file tree 3 files changed +19
-12
lines changed
Expand file tree Collapse file tree 3 files changed +19
-12
lines changed Original file line number Diff line number Diff line change 33; type: SSDB/REDIS/MONGODB if use redis, only modify the host port,the type should be SSDB
44type = SSDB
55host = localhost
6+ ; port = 6379
67port = 8888
78name = proxy
89
@@ -14,8 +15,9 @@ freeProxyThird = 1
1415freeProxyFourth = 1
1516freeProxyFifth = 1
1617freeProxySixth = 1
18+ freeProxySeventh = 1
1719
1820[HOST]
1921; API接口配置 http://127.0.0.1:5051
2022ip = 0.0.0.0
21- port = 5010
23+ port = 5010
Original file line number Diff line number Diff line change 11FROM python:3.6
2-
32WORKDIR /usr/src/app
4-
53COPY . .
6-
74ENV DEBIAN_FRONTEND noninteractive
85ENV TZ Asia/Shanghai
9-
106RUN pip install --no-cache-dir -r requirements.txt && \
117 apt-get update && \
128 apt-get install -y --force-yes git make gcc g++ autoconf && apt-get clean && \
@@ -16,7 +12,6 @@ RUN pip install --no-cache-dir -r requirements.txt && \
1612 apt-get autoremove -y && \
1713 rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* && \
1814 cp ssdb.conf /etc && cd .. && yes | rm -r ssdb && \
19-
2015 mkdir -p /var/lib/ssdb && \
2116 sed \
2217 -e 's@home.*@home /var/lib@' \
@@ -26,14 +21,10 @@ RUN pip install --no-cache-dir -r requirements.txt && \
2621 -e 's@level:.*@level: info@' \
2722 -e 's@ip:.*@ip: 0.0.0.0@' \
2823 -i /etc/ssdb.conf && \
29-
3024 echo "# ! /bin/sh " > /usr/src/app/run.sh && \
3125 echo "cd Run" >> /usr/src/app/run.sh && \
3226 echo "/usr/bin/ssdb-server /etc/ssdb.conf &" >> /usr/src/app/run.sh && \
3327 echo "python main.py" >> /usr/src/app/run.sh && \
34-
3528 chmod 777 run.sh
36-
3729EXPOSE 5010
38-
3930CMD [ "sh" , "run.sh" ]
Original file line number Diff line number Diff line change @@ -149,6 +149,18 @@ def freeProxySixth():
149149 except Exception as e :
150150 pass
151151
152+ @staticmethod
153+ def freeProxySeventh ():
154+ """
155+ 快代理免费https://www.kuaidaili.com/free/inha/1/
156+ """
157+ url = 'https://www.kuaidaili.com/free/inha/{page}/'
158+ for page in range (1 , 10 ):
159+ page_url = url .format (page = page )
160+ tree = getHtmlTree (page_url )
161+ proxy_list = tree .xpath ('.//table//tr' )
162+ for tr in proxy_list [1 :]:
163+ yield ':' .join (tr .xpath ('./td/text()' )[0 :2 ])
152164
153165if __name__ == '__main__' :
154166 gg = GetFreeProxy ()
@@ -164,8 +176,10 @@ def freeProxySixth():
164176 # for e in gg.freeProxyFourth():
165177 # print(e)
166178
167- for e in gg .freeProxyFifth ():
168- print (e )
179+ # for e in gg.freeProxyFifth():
180+ # print(e)
169181
170182 # for e in gg.freeProxySixth():
171183 # print(e)
184+ for e in gg .freeProxySeventh ():
185+ print (e )
You can’t perform that action at this time.
0 commit comments