diff --git a/src/models/crawlers/dmm.py b/src/models/crawlers/dmm.py index 5e85688..dfd61e6 100644 --- a/src/models/crawlers/dmm.py +++ b/src/models/crawlers/dmm.py @@ -92,18 +92,24 @@ def get_release(html): def get_tag(html): result = html.xpath("//td[contains(text(),'ジャンル')]/following-sibling::td/a/text()") if not result: - result = html.xpath("//div[@class='info__item']/table/tbody/tr/th[contains(text(),'ジャンル')]/following-sibling::td/a/text()") + result = html.xpath( + "//div[@class='info__item']/table/tbody/tr/th[contains(text(),'ジャンル')]/following-sibling::td/a/text()") return str(result).strip(" ['']").replace("', '", ",") def get_cover(html): result = html.xpath('//a[@name="package-image"]/@href') - return result[0] if result else '' + result = re.sub(r'pics.dmm.co.jp', r'awsimgsrc.dmm.co.jp/pics_dig',result[0]) + return result if result else '' def get_poster(html, cover): result = html.xpath('//img[@class="tdmm"]/@src') - return result[0] if result else cover.replace('pt.jpg', 'ps.jpg') + if result: + result = re.sub(r'pics.dmm.co.jp', r'awsimgsrc.dmm.co.jp/pics_dig', result[0]) + return result + else: + return cover.replace('pt.jpg', 'ps.jpg') def get_extrafanart(html): @@ -127,7 +133,8 @@ def get_director(html): def get_ountline(html): - result = html.xpath("normalize-space(string(//div[@class='wp-smplex']/preceding-sibling::div[contains(@class, 'mg-b20')][1]))") + result = html.xpath( + "normalize-space(string(//div[@class='wp-smplex']/preceding-sibling::div[contains(@class, 'mg-b20')][1]))") return result.replace('「コンビニ受取」対象商品です。詳しくはこちらをご覧ください。', '').strip() @@ -237,12 +244,20 @@ def get_tv_jp_data(real_url): 'user-agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Safari/537.36', } data = { - "operationName": "GetFanzaTvContentDetail", - "variables": {"id": cid, "device": "BROWSER", "playDevice": "BROWSER", "isLoggedIn": False}, - "query": "query GetFanzaTvContentDetail($id: ID!, $device: Device!, $isLoggedIn: Boolean!, $playDevice: PlayDevice!) {\n fanzaTV(device: $device) {\n content(id: $id) {\n __typename\n id\n contentType\n shopName\n shopOption\n shopType\n title\n description\n packageImage\n packageLargeImage\n noIndex\n ppvShopName\n viewingRights(device: $playDevice) @include(if: $isLoggedIn) {\n isStreamable\n __typename\n }\n startDeliveryAt\n endDeliveryAt\n isBeingDelivered\n hasBookmark @include(if: $isLoggedIn)\n sampleMovie {\n url\n thumbnail\n __typename\n }\n samplePictures {\n image\n imageLarge\n __typename\n }\n actresses {\n id\n name\n __typename\n }\n histrions {\n id\n name\n __typename\n }\n directors {\n id\n name\n __typename\n }\n series {\n id\n name\n __typename\n }\n maker {\n id\n name\n __typename\n }\n label {\n id\n name\n __typename\n }\n genres {\n id\n name\n __typename\n }\n playInfo(withResume: $isLoggedIn, device: $device) {\n parts {\n contentId\n number\n duration\n resumePoint\n __typename\n }\n resumePartNumber\n highestQualityName\n duration\n __typename\n }\n reviewSummary {\n averagePoint\n reviewerCount\n reviewCommentCount\n __typename\n }\n reviews(first: 5) {\n edges {\n node {\n id\n reviewerName\n reviewerId\n title\n point\n hasSpoiler\n comment\n date\n postEvaluationCount\n helpfulVoteCount\n isReviewerPurchased\n __typename\n }\n __typename\n }\n pageInfo {\n endCursor\n hasNextPage\n __typename\n }\n total\n __typename\n }\n fanzaTvRecommendations: itemBasedRecommendations(\n device: $device\n shop: FANZA_TV\n limit: 30\n ) {\n id\n title\n packageImage\n averageReviewPoint\n price\n salePrice\n __typename\n }\n fanzaPpvRecommendations: itemBasedRecommendations(\n device: $device\n shop: VIDEO\n limit: 30\n ) {\n id\n title\n packageImage\n averageReviewPoint\n price\n salePrice\n __typename\n }\n }\n userBasedRecommendations(place: DETAIL_PAGE, limit: 30) @include(if: $isLoggedIn) {\n id\n title\n packageImage\n averageReviewPoint\n price\n salePrice\n __typename\n }\n __typename\n }\n}\n" + "operationName": + "GetFanzaTvContentDetail", + "variables": { + "id": cid, + "device": "BROWSER", + "playDevice": "BROWSER", + "isLoggedIn": False + }, + "query": + "query GetFanzaTvContentDetail($id: ID!, $device: Device!, $isLoggedIn: Boolean!, $playDevice: PlayDevice!) {\n fanzaTV(device: $device) {\n content(id: $id) {\n __typename\n id\n contentType\n shopName\n shopOption\n shopType\n title\n description\n packageImage\n packageLargeImage\n noIndex\n ppvShopName\n viewingRights(device: $playDevice) @include(if: $isLoggedIn) {\n isStreamable\n __typename\n }\n startDeliveryAt\n endDeliveryAt\n isBeingDelivered\n hasBookmark @include(if: $isLoggedIn)\n sampleMovie {\n url\n thumbnail\n __typename\n }\n samplePictures {\n image\n imageLarge\n __typename\n }\n actresses {\n id\n name\n __typename\n }\n histrions {\n id\n name\n __typename\n }\n directors {\n id\n name\n __typename\n }\n series {\n id\n name\n __typename\n }\n maker {\n id\n name\n __typename\n }\n label {\n id\n name\n __typename\n }\n genres {\n id\n name\n __typename\n }\n playInfo(withResume: $isLoggedIn, device: $device) {\n parts {\n contentId\n number\n duration\n resumePoint\n __typename\n }\n resumePartNumber\n highestQualityName\n duration\n __typename\n }\n reviewSummary {\n averagePoint\n reviewerCount\n reviewCommentCount\n __typename\n }\n reviews(first: 5) {\n edges {\n node {\n id\n reviewerName\n reviewerId\n title\n point\n hasSpoiler\n comment\n date\n postEvaluationCount\n helpfulVoteCount\n isReviewerPurchased\n __typename\n }\n __typename\n }\n pageInfo {\n endCursor\n hasNextPage\n __typename\n }\n total\n __typename\n }\n fanzaTvRecommendations: itemBasedRecommendations(\n device: $device\n shop: FANZA_TV\n limit: 30\n ) {\n id\n title\n packageImage\n averageReviewPoint\n price\n salePrice\n __typename\n }\n fanzaPpvRecommendations: itemBasedRecommendations(\n device: $device\n shop: VIDEO\n limit: 30\n ) {\n id\n title\n packageImage\n averageReviewPoint\n price\n salePrice\n __typename\n }\n }\n userBasedRecommendations(place: DETAIL_PAGE, limit: 30) @include(if: $isLoggedIn) {\n id\n title\n packageImage\n averageReviewPoint\n price\n salePrice\n __typename\n }\n __typename\n }\n}\n" } - result, response = post_html('https://api.tv.dmm.co.jp/graphql', headers=headers, json=data, json_data=True, keep=False) + result, response = post_html('https://api.tv.dmm.co.jp/graphql', headers=headers, json=data, json_data=True, + keep=False) if result and response.get('data'): api_data = response['data']['fanzaTV']['content'] title = api_data['title'] @@ -307,12 +322,22 @@ def get_tv_com_data(number): 'user-agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.0.0 Safari/537.36', } data = { - "operationName": "GetVideo", - "variables": {"seasonId": number, "contentId": "", "device": "BROWSER", "playDevice": "BROWSER", "isLoggedIn": False, "isContentId": False}, - "query": "query GetVideo($seasonId: ID!, $contentId: ID!, $device: Device!, $playDevice: PlayDevice!, $isLoggedIn: Boolean!, $isContentId: Boolean!) {\n video(id: $seasonId) {\n id\n seasonType\n hasBookmark @include(if: $isLoggedIn)\n titleName\n seasonName\n highlight(format: HTML)\n description(format: HTML)\n notices(format: HTML)\n packageImage\n productionYear\n isNewArrival\n isPublic\n isExclusive\n isBeingDelivered\n viewingTypes\n campaign {\n name\n endAt\n __typename\n }\n rating {\n category\n __typename\n }\n casts {\n castName\n actorName\n person {\n id\n __typename\n }\n __typename\n }\n staffs {\n roleName\n staffName\n person {\n id\n __typename\n }\n __typename\n }\n categories {\n name\n id\n __typename\n }\n genres {\n name\n id\n __typename\n }\n copyright\n relatedItems(device: $device) {\n videos {\n seasonId\n video {\n id\n titleName\n packageImage\n isNewArrival\n isExclusive\n __typename\n }\n __typename\n }\n books {\n seriesId\n title\n thumbnail\n url\n __typename\n }\n mono {\n banner\n url\n __typename\n }\n scratch {\n banner\n url\n __typename\n }\n onlineCrane {\n banner\n url\n __typename\n }\n __typename\n }\n ... on VideoSeason {\n ...CommonVideoSeason\n __typename\n }\n ... on VideoLegacySeason {\n ...CommonVideoLegacySeason\n __typename\n }\n ... on VideoStageSeason {\n ...CommonVideoStageSeason\n __typename\n }\n ... on VideoSpotLiveSeason {\n ...CommonVideoSpotLiveSeason\n __typename\n }\n __typename\n }\n}\n\nfragment CommonVideoSeason on VideoSeason {\n __typename\n metaDescription: description(format: PLAIN)\n keyVisualImage\n keyVisualWithoutLogoImage\n reviewSummary {\n averagePoint\n reviewerCount\n reviewCommentCount\n __typename\n }\n relatedSeasons {\n id\n title\n __typename\n }\n upcomingEpisode {\n svodProduct {\n startDeliveryAt\n __typename\n }\n __typename\n }\n continueWatching @include(if: $isLoggedIn) {\n resumePoint\n contentId\n content {\n episodeImage\n episodeTitle\n episodeNumber\n episodeNumberName\n viewingRights(device: $playDevice) {\n isStreamable\n __typename\n }\n __typename\n }\n __typename\n }\n priceSummary {\n lowestPrice\n discountedLowestPrice\n __typename\n }\n episode(id: $contentId) @include(if: $isContentId) {\n id\n episodeTitle\n episodeImage\n episodeNumber\n episodeNumberName\n episodeDetail\n playInfo {\n highestQuality\n isSupportHDR\n highestAudioChannelLayout\n duration\n audioRenditions\n textRenditions\n __typename\n }\n viewingRights(device: $playDevice) {\n isDownloadable\n isStreamable\n __typename\n }\n ppvExpiration @include(if: $isLoggedIn) {\n expirationType\n viewingExpiration\n viewingStartExpiration\n startDeliveryAt\n __typename\n }\n freeProduct {\n contentId\n __typename\n }\n ppvProducts {\n ...VideoPPVProductTag\n __typename\n }\n svodProduct {\n startDeliveryAt\n __typename\n }\n __typename\n }\n episodes(type: MAIN, first: 1) {\n edges {\n node {\n id\n sampleMovie\n episodeTitle\n episodeNumber\n episodeNumberName\n playInfo {\n highestQuality\n isSupportHDR\n highestAudioChannelLayout\n duration\n audioRenditions\n textRenditions\n __typename\n }\n viewingRights(device: $playDevice) {\n isDownloadable\n isStreamable\n downloadableFiles @include(if: $isLoggedIn) {\n quality {\n name\n displayName\n displayPriority\n __typename\n }\n totalFileSize\n parts {\n partNumber\n fileSize\n __typename\n }\n __typename\n }\n __typename\n }\n ppvExpiration @include(if: $isLoggedIn) {\n expirationType\n viewingExpiration\n viewingStartExpiration\n startDeliveryAt\n __typename\n }\n freeProduct {\n contentId\n __typename\n }\n ppvProducts {\n ...VideoPPVProductTag\n __typename\n }\n svodProduct {\n startDeliveryAt\n __typename\n }\n __typename\n }\n __typename\n }\n total\n __typename\n }\n purchasedContents(first: 1) @include(if: $isLoggedIn) {\n edges {\n node {\n id\n __typename\n }\n __typename\n }\n total\n __typename\n }\n specialEpisode: episodes(type: SPECIAL, first: 1) {\n total\n __typename\n }\n pvEpisode: episodes(type: PV, first: 1) {\n edges {\n node {\n id\n sampleMovie\n playInfo {\n duration\n __typename\n }\n __typename\n }\n __typename\n }\n total\n __typename\n }\n}\n\nfragment VideoPPVProductTag on VideoPPVProduct {\n id\n isOnSale\n isBeingDelivered\n isPurchased @include(if: $isLoggedIn)\n price {\n price\n salePrice\n __typename\n }\n __typename\n}\n\nfragment CommonVideoLegacySeason on VideoLegacySeason {\n __typename\n metaDescription: description(format: PLAIN)\n packageLargeImage\n reviewSummary {\n averagePoint\n reviewerCount\n reviewCommentCount\n __typename\n }\n sampleMovie {\n url\n thumbnail\n __typename\n }\n samplePictures {\n image\n imageLarge\n __typename\n }\n sampleMovie {\n url\n thumbnail\n __typename\n }\n reviewSummary {\n averagePoint\n __typename\n }\n priceSummary {\n lowestPrice\n discountedLowestPrice\n __typename\n }\n continueWatching @include(if: $isLoggedIn) {\n partNumber\n resumePoint\n contentId\n content {\n playInfo {\n parts {\n contentId\n __typename\n }\n __typename\n }\n viewingRights(device: $playDevice) {\n isStreamable\n __typename\n }\n __typename\n }\n __typename\n }\n content {\n id\n contentType\n viewingRights(device: $playDevice) {\n isStreamable\n isDownloadable\n downloadableFiles @include(if: $isLoggedIn) {\n quality {\n name\n displayName\n displayPriority\n __typename\n }\n totalFileSize\n parts {\n partNumber\n fileSize\n __typename\n }\n __typename\n }\n windowsURLSchemes: appURLSchemes(app: WINDOWS_VR) @include(if: $isLoggedIn) {\n partNumber\n url\n __typename\n }\n iosURLSchemes: appURLSchemes(app: IOS_VR) @include(if: $isLoggedIn) {\n partNumber\n url\n __typename\n }\n androidURLSchemes: appURLSchemes(app: ANDROID_VR) @include(if: $isLoggedIn) {\n partNumber\n url\n __typename\n }\n __typename\n }\n playInfo {\n duration\n audioRenditions\n textRenditions\n highestQuality\n isSupportHDR\n highestAudioChannelLayout\n parts {\n contentId\n number\n __typename\n }\n __typename\n }\n ppvExpiration @include(if: $isLoggedIn) {\n expirationType\n viewingExpiration\n viewingStartExpiration\n startDeliveryAt\n __typename\n }\n freeProduct {\n contentId\n __typename\n }\n ppvProducts {\n ...VideoPPVProductTag\n __typename\n }\n svodProduct {\n startDeliveryAt\n __typename\n }\n __typename\n }\n series {\n id\n name\n __typename\n }\n}\n\nfragment CommonVideoStageSeason on VideoStageSeason {\n __typename\n metaDescription: description(format: PLAIN)\n keyVisualImage\n keyVisualWithoutLogoImage\n reviewSummary {\n averagePoint\n reviewerCount\n reviewCommentCount\n __typename\n }\n priceSummary {\n lowestPrice\n discountedLowestPrice\n __typename\n }\n allPerformances {\n performanceDate\n contents {\n id\n episodeTitle\n priority\n startLivePerformanceAt\n ppvProducts {\n ...VideoPPVProductTag\n __typename\n }\n __typename\n }\n __typename\n }\n purchasedContents(first: 1) @include(if: $isLoggedIn) {\n edges {\n node {\n id\n __typename\n }\n __typename\n }\n total\n __typename\n }\n}\n\nfragment CommonVideoSpotLiveSeason on VideoSpotLiveSeason {\n __typename\n metaDescription: description(format: PLAIN)\n keyVisualImage\n keyVisualWithoutLogoImage\n episodes(type: MAIN, first: 1) {\n edges {\n node {\n id\n episodeTitle\n episodeNumber\n episodeNumberName\n viewingRights(device: $playDevice) {\n isStreamable\n __typename\n }\n ppvExpiration @include(if: $isLoggedIn) {\n expirationType\n viewingExpiration\n viewingStartExpiration\n startDeliveryAt\n __typename\n }\n freeProduct {\n contentId\n __typename\n }\n ppvProducts {\n ...VideoPPVProductTag\n __typename\n }\n svodProduct {\n startDeliveryAt\n __typename\n }\n playInfo {\n audioRenditions\n textRenditions\n duration\n highestQuality\n isSupportHDR\n highestAudioChannelLayout\n __typename\n }\n __typename\n }\n __typename\n }\n __typename\n }\n}\n" + "operationName": + "GetVideo", + "variables": { + "seasonId": number, + "contentId": "", + "device": "BROWSER", + "playDevice": "BROWSER", + "isLoggedIn": False, + "isContentId": False + }, + "query": + "query GetVideo($seasonId: ID!, $contentId: ID!, $device: Device!, $playDevice: PlayDevice!, $isLoggedIn: Boolean!, $isContentId: Boolean!) {\n video(id: $seasonId) {\n id\n seasonType\n hasBookmark @include(if: $isLoggedIn)\n titleName\n seasonName\n highlight(format: HTML)\n description(format: HTML)\n notices(format: HTML)\n packageImage\n productionYear\n isNewArrival\n isPublic\n isExclusive\n isBeingDelivered\n viewingTypes\n campaign {\n name\n endAt\n __typename\n }\n rating {\n category\n __typename\n }\n casts {\n castName\n actorName\n person {\n id\n __typename\n }\n __typename\n }\n staffs {\n roleName\n staffName\n person {\n id\n __typename\n }\n __typename\n }\n categories {\n name\n id\n __typename\n }\n genres {\n name\n id\n __typename\n }\n copyright\n relatedItems(device: $device) {\n videos {\n seasonId\n video {\n id\n titleName\n packageImage\n isNewArrival\n isExclusive\n __typename\n }\n __typename\n }\n books {\n seriesId\n title\n thumbnail\n url\n __typename\n }\n mono {\n banner\n url\n __typename\n }\n scratch {\n banner\n url\n __typename\n }\n onlineCrane {\n banner\n url\n __typename\n }\n __typename\n }\n ... on VideoSeason {\n ...CommonVideoSeason\n __typename\n }\n ... on VideoLegacySeason {\n ...CommonVideoLegacySeason\n __typename\n }\n ... on VideoStageSeason {\n ...CommonVideoStageSeason\n __typename\n }\n ... on VideoSpotLiveSeason {\n ...CommonVideoSpotLiveSeason\n __typename\n }\n __typename\n }\n}\n\nfragment CommonVideoSeason on VideoSeason {\n __typename\n metaDescription: description(format: PLAIN)\n keyVisualImage\n keyVisualWithoutLogoImage\n reviewSummary {\n averagePoint\n reviewerCount\n reviewCommentCount\n __typename\n }\n relatedSeasons {\n id\n title\n __typename\n }\n upcomingEpisode {\n svodProduct {\n startDeliveryAt\n __typename\n }\n __typename\n }\n continueWatching @include(if: $isLoggedIn) {\n resumePoint\n contentId\n content {\n episodeImage\n episodeTitle\n episodeNumber\n episodeNumberName\n viewingRights(device: $playDevice) {\n isStreamable\n __typename\n }\n __typename\n }\n __typename\n }\n priceSummary {\n lowestPrice\n discountedLowestPrice\n __typename\n }\n episode(id: $contentId) @include(if: $isContentId) {\n id\n episodeTitle\n episodeImage\n episodeNumber\n episodeNumberName\n episodeDetail\n playInfo {\n highestQuality\n isSupportHDR\n highestAudioChannelLayout\n duration\n audioRenditions\n textRenditions\n __typename\n }\n viewingRights(device: $playDevice) {\n isDownloadable\n isStreamable\n __typename\n }\n ppvExpiration @include(if: $isLoggedIn) {\n expirationType\n viewingExpiration\n viewingStartExpiration\n startDeliveryAt\n __typename\n }\n freeProduct {\n contentId\n __typename\n }\n ppvProducts {\n ...VideoPPVProductTag\n __typename\n }\n svodProduct {\n startDeliveryAt\n __typename\n }\n __typename\n }\n episodes(type: MAIN, first: 1) {\n edges {\n node {\n id\n sampleMovie\n episodeTitle\n episodeNumber\n episodeNumberName\n playInfo {\n highestQuality\n isSupportHDR\n highestAudioChannelLayout\n duration\n audioRenditions\n textRenditions\n __typename\n }\n viewingRights(device: $playDevice) {\n isDownloadable\n isStreamable\n downloadableFiles @include(if: $isLoggedIn) {\n quality {\n name\n displayName\n displayPriority\n __typename\n }\n totalFileSize\n parts {\n partNumber\n fileSize\n __typename\n }\n __typename\n }\n __typename\n }\n ppvExpiration @include(if: $isLoggedIn) {\n expirationType\n viewingExpiration\n viewingStartExpiration\n startDeliveryAt\n __typename\n }\n freeProduct {\n contentId\n __typename\n }\n ppvProducts {\n ...VideoPPVProductTag\n __typename\n }\n svodProduct {\n startDeliveryAt\n __typename\n }\n __typename\n }\n __typename\n }\n total\n __typename\n }\n purchasedContents(first: 1) @include(if: $isLoggedIn) {\n edges {\n node {\n id\n __typename\n }\n __typename\n }\n total\n __typename\n }\n specialEpisode: episodes(type: SPECIAL, first: 1) {\n total\n __typename\n }\n pvEpisode: episodes(type: PV, first: 1) {\n edges {\n node {\n id\n sampleMovie\n playInfo {\n duration\n __typename\n }\n __typename\n }\n __typename\n }\n total\n __typename\n }\n}\n\nfragment VideoPPVProductTag on VideoPPVProduct {\n id\n isOnSale\n isBeingDelivered\n isPurchased @include(if: $isLoggedIn)\n price {\n price\n salePrice\n __typename\n }\n __typename\n}\n\nfragment CommonVideoLegacySeason on VideoLegacySeason {\n __typename\n metaDescription: description(format: PLAIN)\n packageLargeImage\n reviewSummary {\n averagePoint\n reviewerCount\n reviewCommentCount\n __typename\n }\n sampleMovie {\n url\n thumbnail\n __typename\n }\n samplePictures {\n image\n imageLarge\n __typename\n }\n sampleMovie {\n url\n thumbnail\n __typename\n }\n reviewSummary {\n averagePoint\n __typename\n }\n priceSummary {\n lowestPrice\n discountedLowestPrice\n __typename\n }\n continueWatching @include(if: $isLoggedIn) {\n partNumber\n resumePoint\n contentId\n content {\n playInfo {\n parts {\n contentId\n __typename\n }\n __typename\n }\n viewingRights(device: $playDevice) {\n isStreamable\n __typename\n }\n __typename\n }\n __typename\n }\n content {\n id\n contentType\n viewingRights(device: $playDevice) {\n isStreamable\n isDownloadable\n downloadableFiles @include(if: $isLoggedIn) {\n quality {\n name\n displayName\n displayPriority\n __typename\n }\n totalFileSize\n parts {\n partNumber\n fileSize\n __typename\n }\n __typename\n }\n windowsURLSchemes: appURLSchemes(app: WINDOWS_VR) @include(if: $isLoggedIn) {\n partNumber\n url\n __typename\n }\n iosURLSchemes: appURLSchemes(app: IOS_VR) @include(if: $isLoggedIn) {\n partNumber\n url\n __typename\n }\n androidURLSchemes: appURLSchemes(app: ANDROID_VR) @include(if: $isLoggedIn) {\n partNumber\n url\n __typename\n }\n __typename\n }\n playInfo {\n duration\n audioRenditions\n textRenditions\n highestQuality\n isSupportHDR\n highestAudioChannelLayout\n parts {\n contentId\n number\n __typename\n }\n __typename\n }\n ppvExpiration @include(if: $isLoggedIn) {\n expirationType\n viewingExpiration\n viewingStartExpiration\n startDeliveryAt\n __typename\n }\n freeProduct {\n contentId\n __typename\n }\n ppvProducts {\n ...VideoPPVProductTag\n __typename\n }\n svodProduct {\n startDeliveryAt\n __typename\n }\n __typename\n }\n series {\n id\n name\n __typename\n }\n}\n\nfragment CommonVideoStageSeason on VideoStageSeason {\n __typename\n metaDescription: description(format: PLAIN)\n keyVisualImage\n keyVisualWithoutLogoImage\n reviewSummary {\n averagePoint\n reviewerCount\n reviewCommentCount\n __typename\n }\n priceSummary {\n lowestPrice\n discountedLowestPrice\n __typename\n }\n allPerformances {\n performanceDate\n contents {\n id\n episodeTitle\n priority\n startLivePerformanceAt\n ppvProducts {\n ...VideoPPVProductTag\n __typename\n }\n __typename\n }\n __typename\n }\n purchasedContents(first: 1) @include(if: $isLoggedIn) {\n edges {\n node {\n id\n __typename\n }\n __typename\n }\n total\n __typename\n }\n}\n\nfragment CommonVideoSpotLiveSeason on VideoSpotLiveSeason {\n __typename\n metaDescription: description(format: PLAIN)\n keyVisualImage\n keyVisualWithoutLogoImage\n episodes(type: MAIN, first: 1) {\n edges {\n node {\n id\n episodeTitle\n episodeNumber\n episodeNumberName\n viewingRights(device: $playDevice) {\n isStreamable\n __typename\n }\n ppvExpiration @include(if: $isLoggedIn) {\n expirationType\n viewingExpiration\n viewingStartExpiration\n startDeliveryAt\n __typename\n }\n freeProduct {\n contentId\n __typename\n }\n ppvProducts {\n ...VideoPPVProductTag\n __typename\n }\n svodProduct {\n startDeliveryAt\n __typename\n }\n playInfo {\n audioRenditions\n textRenditions\n duration\n highestQuality\n isSupportHDR\n highestAudioChannelLayout\n __typename\n }\n __typename\n }\n __typename\n }\n __typename\n }\n}\n" } - result, response = post_html('https://api.tv.dmm.com/graphql', headers=headers, json=data, json_data=True, keep=False) + result, response = post_html('https://api.tv.dmm.com/graphql', headers=headers, json=data, json_data=True, + keep=False) if result and response.get('data'): api_data = response['data']['video'] title = api_data['titleName'] @@ -471,7 +496,8 @@ def main(number, appoint_url='', log_info='', req_web='', language='jp', file_pa number_00 = '5497' + number_00 elif number_00.lower().startswith('ftbd'): number_00 = '5533' + number_00 - elif number_00.lower().startswith('ugm') or number_00.lower().startswith('dmi') or number_00.lower().startswith('whm'): + elif number_00.lower().startswith('ugm') or number_00.lower().startswith( + 'dmi') or number_00.lower().startswith('whm'): number_00 = '5083' + number_00 number_00 = '5083' + number_00 real_url = f'https://tv.dmm.com/vod/detail/?season={number_00}' @@ -635,4 +661,18 @@ def main(number, appoint_url='', log_info='', req_web='', language='jp', file_pa # print(main('ssni00888')) # print(main('ssni-288')) # print(main('', 'https://www.dmm.co.jp/digital/videoa/-/detail/=/cid=ssni00288/')) - print(main('俺をイジメてた地元ヤンキーの巨乳彼女を寝とって復讐を果たす話 The Motion Anime')) # 模糊匹配 MAXVR-008 # print(main('', 'https://www.dmm.co.jp/mono/dvd/-/detail/=/cid=h_173dhry23/')) # 地域限制 # print(main('ssni00288')) # print(main('ssni00999')) # print(main('ipx-292')) # print(main('wicp-002')) # 无视频 # print(main('ssis-080')) # print(main('DV-1562')) # print(main('mide00139', "https://www.dmm.co.jp/digital/videoa/-/detail/=/cid=mide00139")) # print(main('mide00139', "")) # print(main('kawd00969')) # print(main('', 'https://tv.dmm.com/vod/detail/?title=5533ftbd00042&season=5533ftbd00042')) # print(main('stars-779')) # print(main('FAKWM-001', 'https://tv.dmm.com/vod/detail/?season=5497fakwm00001')) # print(main('FAKWM-064', 'https://tv.dmm.com/vod/detail/?season=5497fakwm00064')) + # print(main('俺をイジメてた地元ヤンキーの巨乳彼女を寝とって復讐を果たす話 The Motion Anime')) # 模糊匹配 MAXVR-008 + # print(main('', 'https://www.dmm.co.jp/mono/dvd/-/detail/=/cid=h_173dhry23/')) # 地域限制 + # print(main('ssni00288')) + # print(main('ssni00999')) + # print(main('ipx-292')) + # print(main('wicp-002')) # 无视频 + # print(main('ssis-080')) + # print(main('DV-1562')) + # print(main('mide00139', "https://www.dmm.co.jp/digital/videoa/-/detail/=/cid=mide00139")) + # print(main('mide00139', "")) + # print(main('kawd00969')) + # print(main('', 'https://tv.dmm.com/vod/detail/?title=5533ftbd00042&season=5533ftbd00042')) + # print(main('stars-779')) + # print(main('FAKWM-001', 'https://tv.dmm.com/vod/detail/?season=5497fakwm00001')) + # print(main('FAKWM-064', 'https://tv.dmm.com/vod/detail/?season=5497fakwm00064'))