From 43b0bf7c34ed4fdf97eda14d49c97d5f67ed8ec7 Mon Sep 17 00:00:00 2001 From: root Date: Sat, 15 Aug 2020 17:14:38 +0800 Subject: [PATCH] Update 3.7-finaly --- WebCrawler/avsox.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/WebCrawler/avsox.py b/WebCrawler/avsox.py index 8aec076..f15b9b4 100644 --- a/WebCrawler/avsox.py +++ b/WebCrawler/avsox.py @@ -1,5 +1,5 @@ import sys -sys.path.append('../') +sys.path.append('..') import re from lxml import etree import json @@ -88,12 +88,10 @@ def main(number): result1 = str(html.xpath('//*[@id="waterfall"]/div/a/@href')).strip(" ['']") if result1 == '' or result1 == 'null' or result1 == 'None': a = get_html('https://avsox.host/cn/search/' + number.replace('-', '_')) - print(a) html = etree.fromstring(a, etree.HTMLParser()) # //table/tr[1]/td[1]/text() result1 = str(html.xpath('//*[@id="waterfall"]/div/a/@href')).strip(" ['']") if result1 == '' or result1 == 'null' or result1 == 'None': a = get_html('https://avsox.host/cn/search/' + number.replace('_', '')) - print(a) html = etree.fromstring(a, etree.HTMLParser()) # //table/tr[1]/td[1]/text() result1 = str(html.xpath('//*[@id="waterfall"]/div/a/@href')).strip(" ['']") web = get_html(result1)