Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
98faa64260 | ||
|
|
7868bd0b77 | ||
|
|
33db5f6f8e | ||
|
|
86e95589a9 | ||
|
|
3b84877a53 | ||
|
|
ec9957c75c | ||
|
|
f434cbb16d | ||
|
|
697d9a9fd0 | ||
|
|
899a0b18eb |
+4
-10
@@ -8,6 +8,9 @@ import re
|
|||||||
import time
|
import time
|
||||||
import sys
|
import sys
|
||||||
from lxml import etree
|
from lxml import etree
|
||||||
|
import sys
|
||||||
|
import io
|
||||||
|
sys.stdout = io.TextIOWrapper(sys.stdout.buffer, errors = 'replace', line_buffering = True)
|
||||||
|
|
||||||
config_file='config.ini'
|
config_file='config.ini'
|
||||||
config = ConfigParser()
|
config = ConfigParser()
|
||||||
@@ -103,16 +106,7 @@ def get_html(url,cookies = None):#网页请求核心
|
|||||||
getweb = requests.get(str(url), headers=headers, timeout=timeout, cookies=cookies)
|
getweb = requests.get(str(url), headers=headers, timeout=timeout, cookies=cookies)
|
||||||
getweb.encoding = 'utf-8'
|
getweb.encoding = 'utf-8'
|
||||||
return getweb.text
|
return getweb.text
|
||||||
except requests.exceptions.RequestException:
|
except:
|
||||||
i += 1
|
|
||||||
print('[-]Connect retry '+str(i)+'/'+str(retry_count))
|
|
||||||
except requests.exceptions.ConnectionError:
|
|
||||||
i += 1
|
|
||||||
print('[-]Connect retry '+str(i)+'/'+str(retry_count))
|
|
||||||
except requests.exceptions.ProxyError:
|
|
||||||
i += 1
|
|
||||||
print('[-]Connect retry '+str(i)+'/'+str(retry_count))
|
|
||||||
except requests.exceptions.ConnectTimeout:
|
|
||||||
i += 1
|
i += 1
|
||||||
print('[-]Connect retry '+str(i)+'/'+str(retry_count))
|
print('[-]Connect retry '+str(i)+'/'+str(retry_count))
|
||||||
print('[-]Connect Failed! Please check your Proxy or Network!')
|
print('[-]Connect Failed! Please check your Proxy or Network!')
|
||||||
|
|||||||
+1
-1
@@ -15,7 +15,7 @@ os.chdir(os.getcwd())
|
|||||||
|
|
||||||
# ============global var===========
|
# ============global var===========
|
||||||
|
|
||||||
version='1.7'
|
version='1.9'
|
||||||
|
|
||||||
config = ConfigParser()
|
config = ConfigParser()
|
||||||
config.read(config_file, encoding='UTF-8')
|
config.read(config_file, encoding='UTF-8')
|
||||||
|
|||||||
@@ -7,7 +7,6 @@
|
|||||||

|

|
||||||

|

|
||||||
<br>
|
<br>
|
||||||
[](http://hits.dwyl.io/yoshiko2/av_data_capture)
|
|
||||||
|
|
||||||
|
|
||||||
**日本电影元数据 抓取工具 | 刮削器**,配合本地影片管理软件EMBY,KODI等管理本地影片,该软件起到分类与元数据抓取作用,利用元数据信息来分类,供本地影片分类整理使用。
|
**日本电影元数据 抓取工具 | 刮削器**,配合本地影片管理软件EMBY,KODI等管理本地影片,该软件起到分类与元数据抓取作用,利用元数据信息来分类,供本地影片分类整理使用。
|
||||||
|
|||||||
+3
-4
@@ -4,8 +4,7 @@ failed_output_folder=failed
|
|||||||
success_output_folder=JAV_output
|
success_output_folder=JAV_output
|
||||||
|
|
||||||
[proxy]
|
[proxy]
|
||||||
proxy=10.168.1.254:3128
|
proxy=127.0.0.1:1081
|
||||||
#proxy=127.0.0.1:1080
|
|
||||||
timeout=10
|
timeout=10
|
||||||
retry=3
|
retry=3
|
||||||
|
|
||||||
@@ -26,5 +25,5 @@ directory=
|
|||||||
[escape]
|
[escape]
|
||||||
literals=\()
|
literals=\()
|
||||||
|
|
||||||
[movie]
|
[movie_location]
|
||||||
path=/root/sort/test
|
path=
|
||||||
|
|||||||
@@ -71,5 +71,3 @@ def main(number):
|
|||||||
}
|
}
|
||||||
js = json.dumps(dic, ensure_ascii=False, sort_keys=True, indent=4, separators=(',', ':'),)#.encode('UTF-8')
|
js = json.dumps(dic, ensure_ascii=False, sort_keys=True, indent=4, separators=(',', ':'),)#.encode('UTF-8')
|
||||||
return js
|
return js
|
||||||
|
|
||||||
#print(main('1145465'))
|
|
||||||
@@ -135,3 +135,4 @@ def main_uncensored(number):
|
|||||||
}
|
}
|
||||||
js = json.dumps(dic, ensure_ascii=False, sort_keys=True, indent=4, separators=(',', ':'), ) # .encode('UTF-8')
|
js = json.dumps(dic, ensure_ascii=False, sort_keys=True, indent=4, separators=(',', ':'), ) # .encode('UTF-8')
|
||||||
return js
|
return js
|
||||||
|
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ from ADC_function import *
|
|||||||
def getTitle(a):
|
def getTitle(a):
|
||||||
try:
|
try:
|
||||||
html = etree.fromstring(a, etree.HTMLParser())
|
html = etree.fromstring(a, etree.HTMLParser())
|
||||||
result = str(html.xpath('//*[@id="center_column"]/div[2]/h1/text()')).strip(" ['']")
|
result = str(html.xpath('//*[@id="center_column"]/div[1]/h1/text()')).strip(" ['']")
|
||||||
return result.replace('/', ',')
|
return result.replace('/', ',')
|
||||||
except:
|
except:
|
||||||
return ''
|
return ''
|
||||||
@@ -62,7 +62,8 @@ def getTag(a):
|
|||||||
return str(result1 + result2).strip('+').replace("', '\\n",",").replace("', '","").replace('"','')
|
return str(result1 + result2).strip('+').replace("', '\\n",",").replace("', '","").replace('"','')
|
||||||
def getCover(htmlcode):
|
def getCover(htmlcode):
|
||||||
html = etree.fromstring(htmlcode, etree.HTMLParser())
|
html = etree.fromstring(htmlcode, etree.HTMLParser())
|
||||||
result = str(html.xpath('//*[@id="center_column"]/div[2]/div[1]/div/div/h2/img/@src')).strip(" ['']")
|
result = str(html.xpath('//*[@id="center_column"]/div[1]/div[1]/div/div/h2/img/@src')).strip(" ['']")
|
||||||
|
# /html/body/div[2]/article[2]/div[1]/div[1]/div/div/h2/img/@src
|
||||||
return result
|
return result
|
||||||
def getDirector(a):
|
def getDirector(a):
|
||||||
html = etree.fromstring(a, etree.HTMLParser()) # //table/tr[1]/td[1]/text()
|
html = etree.fromstring(a, etree.HTMLParser()) # //table/tr[1]/td[1]/text()
|
||||||
@@ -77,7 +78,7 @@ def getOutline(htmlcode):
|
|||||||
return result
|
return result
|
||||||
def main(number2):
|
def main(number2):
|
||||||
number=number2.upper()
|
number=number2.upper()
|
||||||
htmlcode=get_html('https://www.mgstage.com/product/product_detail/'+str(number)+'/',cookies={'adc':'1'})
|
htmlcode=str(get_html('https://www.mgstage.com/product/product_detail/'+str(number)+'/',cookies={'adc':'1'}))
|
||||||
soup = BeautifulSoup(htmlcode, 'lxml')
|
soup = BeautifulSoup(htmlcode, 'lxml')
|
||||||
a = str(soup.find(attrs={'class': 'detail_data'})).replace('\n ','').replace(' ','').replace('\n ','').replace('\n ','')
|
a = str(soup.find(attrs={'class': 'detail_data'})).replace('\n ','').replace(' ','').replace('\n ','').replace('\n ','')
|
||||||
dic = {
|
dic = {
|
||||||
@@ -99,6 +100,6 @@ def main(number2):
|
|||||||
'source': 'siro.py',
|
'source': 'siro.py',
|
||||||
}
|
}
|
||||||
js = json.dumps(dic, ensure_ascii=False, sort_keys=True, indent=4, separators=(',', ':'), ) # .encode('UTF-8')
|
js = json.dumps(dic, ensure_ascii=False, sort_keys=True, indent=4, separators=(',', ':'), ) # .encode('UTF-8')
|
||||||
|
print(js)
|
||||||
|
#print(htmlcode)
|
||||||
return js
|
return js
|
||||||
|
|
||||||
#print(main('300maan-373'))
|
|
||||||
+2
-2
@@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"version": "1.7",
|
"version": "1.9",
|
||||||
"version_show":"1.7",
|
"version_show":"1.9",
|
||||||
"download": "https://github.com/yoshiko2/AV_Data_Capture/releases"
|
"download": "https://github.com/yoshiko2/AV_Data_Capture/releases"
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user