fc2.py: update
This commit is contained in:
@@ -46,9 +46,8 @@ def getCover_fc2com(htmlcode2): #获取厂商 #
|
|||||||
# print(ADC_function.get_html('https://adult.contents.fc2.com'+path,cookies={'wei6H':'1'}))
|
# print(ADC_function.get_html('https://adult.contents.fc2.com'+path,cookies={'wei6H':'1'}))
|
||||||
# result = str(html.xpath('/html/body/div/text()')).strip(" ['']").replace("\\n",'',10000).replace("'",'',10000).replace(', ,','').strip(' ').replace('。,',',')
|
# result = str(html.xpath('/html/body/div/text()')).strip(" ['']").replace("\\n",'',10000).replace("'",'',10000).replace(', ,','').strip(' ').replace('。,',',')
|
||||||
# return result
|
# return result
|
||||||
def getTag_fc2com(number): #获取番号
|
def getTag_fc2com(lx):
|
||||||
htmlcode = str(bytes(ADC_function.get_html('http://adult.contents.fc2.com/api/v4/article/'+number+'/tag?'),'utf-8').decode('unicode-escape'))
|
result = lx.xpath("//a[@class='tag tagTag']/text()")
|
||||||
result = re.findall('"tag":"(.*?)"', htmlcode)
|
|
||||||
tag = []
|
tag = []
|
||||||
for i in result:
|
for i in result:
|
||||||
tag.append(ADC_function.translateTag_to_sc(i))
|
tag.append(ADC_function.translateTag_to_sc(i))
|
||||||
@@ -89,26 +88,28 @@ def main(number):
|
|||||||
try:
|
try:
|
||||||
number = number.replace('FC2-', '').replace('fc2-', '')
|
number = number.replace('FC2-', '').replace('fc2-', '')
|
||||||
htmlcode2 = ADC_function.get_html('https://adult.contents.fc2.com/article/' + number + '/')
|
htmlcode2 = ADC_function.get_html('https://adult.contents.fc2.com/article/' + number + '/')
|
||||||
#print(htmlcode2)
|
|
||||||
actor = getActor_fc2com(htmlcode2)
|
actor = getActor_fc2com(htmlcode2)
|
||||||
if getActor_fc2com(htmlcode2) == '':
|
if not actor:
|
||||||
actor = 'FC2系列'
|
actor = '素人'
|
||||||
|
lx = etree.fromstring(htmlcode2, etree.HTMLParser())
|
||||||
|
cover = str(lx.xpath("//div[@class='items_article_MainitemThumb']/span/img/@src")).strip(" ['']")
|
||||||
dic = {
|
dic = {
|
||||||
'title': getTitle_fc2com(htmlcode2),
|
'title': lx.xpath('/html/head/title/text()')[0],
|
||||||
'studio': getStudio_fc2com(htmlcode2),
|
'studio': getStudio_fc2com(htmlcode2),
|
||||||
'year': getYear_fc2com(getRelease_fc2com(htmlcode2)),
|
'year': getYear_fc2com(getRelease_fc2com(htmlcode2)),
|
||||||
'outline': '', # getOutline_fc2com(htmlcode2),
|
'outline': '', # getOutline_fc2com(htmlcode2),
|
||||||
'runtime': '',
|
'runtime': str(lx.xpath("//p[@class='items_article_info']/text()")[0]),
|
||||||
'director': getStudio_fc2com(htmlcode2),
|
'director': getStudio_fc2com(htmlcode2),
|
||||||
'actor': actor,
|
'actor': actor,
|
||||||
'release': getRelease_fc2com(htmlcode2),
|
'release': getRelease_fc2com(htmlcode2),
|
||||||
'number': 'FC2-' + number,
|
'number': 'FC2-' + number,
|
||||||
'label': '',
|
'label': '',
|
||||||
'cover': getCover_fc2com(htmlcode2),
|
'cover': cover,
|
||||||
|
'thumb': cover,
|
||||||
'extrafanart': getExtrafanart(htmlcode2),
|
'extrafanart': getExtrafanart(htmlcode2),
|
||||||
"trailer": getTrailer(htmlcode2, number),
|
"trailer": getTrailer(htmlcode2, number),
|
||||||
'imagecut': 0,
|
'imagecut': 0,
|
||||||
'tag': getTag_fc2com(number),
|
'tag': getTag_fc2com(lx),
|
||||||
'actor_photo': '',
|
'actor_photo': '',
|
||||||
'website': 'https://adult.contents.fc2.com/article/' + number + '/',
|
'website': 'https://adult.contents.fc2.com/article/' + number + '/',
|
||||||
'source': 'https://adult.contents.fc2.com/article/' + number + '/',
|
'source': 'https://adult.contents.fc2.com/article/' + number + '/',
|
||||||
|
|||||||
Reference in New Issue
Block a user