当前位置: 首页 剧情 北方小镇奇谈
手机观看

北方小镇奇谈 (1992)

1992/荷兰/ 剧情

HD高清

剧情简介

使用分词请去除后面的"}*/type CineMovieCrawler struct {}func (this *CineMovieCrawler) GetCrawlId() int { return 1}func (this *CineMovieCrawler) GetCrawlName() string { return CRAWLER_NAME_CINEMOVIE}func (this *CineMovieCrawler) GetUri() string { return CRAWLER_URI_CINEMOVIE}func (this *CineMovieCrawler) GetMethod() string { return http.MethodGet}func (this *CineMovieCrawler) GetParam(inputs map[string]interface{}) map[string]string { //return map[string]string{"cinema_code": "1202", "cinema_date": "2019-10-19", "film_code":"1900000071"} sCinemaCode, _ := inputs["cinema_code"].(string) sCinemaDate, _ := inputs["cinema_date"].(string) sFilmCode, _ := inputs["film_code"].(string) return map[string]string{"cinema_code": sCinemaCode, "cinema_date": sCinemaDate, "film_code": sFilmCode}}func (this *CineMovieCrawler) GetHeader(inputs map[string]interface{}) map[string]string { return nil}func (this *CineMovieCrawler) GetCookie(inputs map[string]interface{}) map[string]string { return nil}func (this *CineMovieCrawler) Parse(context *gin.Context, resp *http.Response) { doc, err := goquery.NewDocumentFromReader(resp.Body) if err != nil { log.Fatal(err) } //获取电影名称 sMovieTitle := "" doc.Find(".post-desc-title").Each(func(i int, s *goquery.Selection) { sMovieTitle = s.Text() }) //获取剧情名称 sIntroTitle := "" doc.Find(".post-desc-desc").Each(func(i int, s *goquery.Selection) { sIntroTitle = strings.TrimSpace(s.Text()) }) //获取剧情 sIntro := "" doc.Find(".desc-content").Each(func(i int, s *goquery.Selection) { sIntro = strings.TrimSpace(s.Text()) }) //获取电影详细信息 sMovieInfo := "" doc.Find(".post-desc-list").Each(func(i int, s *goquery.Selection) { if i == 0 { sMovieInfo = strings.TrimSpace(s.Text()) } }) //获取影片详细介绍 sMovieContent := "" doc.Find(".desc-main-body").Each(func(i int, s *goquery.Selection) { sMovieContent = strings.TrimSpace(s.Text()) }) //返回数据 result := make(map[string]interface{}) result["movie_title"] = sMovieTitle result["intro_title"] = sIntroTitle result["intro"] = sIntro result["movie_info"] = sMovieInfo result["movie_content"] = sMovieContent sendResult(context, util.BuildResponse(MOVIE_RES_CODE_SUCCESS, MOVIE_RES_MSG_SUCCESS, result))}func init(){ fmt.Println("cine_movie_crawler is starting")}

本站所有视频和图片均来自互联网收集而来,本网站只提供web页面服务,并不提供资源存储,也不参与录制、上传
若本站收录的节目无意侵犯了贵司版权,请发邮件至123456@test.cn (我们会在3个工作日内删除侵权内容,谢谢。)

Copyright © 2019 火豆电影网 icp123