Showing preview only (870K chars total). Download the full file or copy to clipboard to get everything.
Repository: icpd/subscribe2clash
Branch: main
Commit: 41a0dfdfc9b4
Files: 117
Total size: 784.3 KB
Directory structure:
gitextract_x32qht1_/
├── .gitattributes
├── .gitignore
├── README.md
├── crawler/
│ ├── config/
│ │ └── config.go
│ ├── engine/
│ │ ├── concurrent.go
│ │ ├── simple.go
│ │ ├── types.go
│ │ └── worker.go
│ ├── fetcher/
│ │ └── fetcher.go
│ ├── frontend/
│ │ ├── controller/
│ │ │ └── searchresult.go
│ │ ├── model/
│ │ │ └── page.go
│ │ ├── starter.go
│ │ └── view/
│ │ ├── css/
│ │ │ └── style.css
│ │ ├── index.html
│ │ ├── js/
│ │ │ └── index.js
│ │ ├── searchresult.go
│ │ ├── searchresult_test.go
│ │ └── template.html
│ ├── main.go
│ ├── model/
│ │ ├── car.go
│ │ └── profile.go
│ ├── persist/
│ │ ├── itemsaver.go
│ │ └── itemsaver_test.go
│ ├── scheduler/
│ │ ├── queued.go
│ │ └── simple.go
│ ├── xcar/
│ │ └── parser/
│ │ ├── cardetail.go
│ │ ├── cardetail_test.go
│ │ ├── cardetail_test_data.html
│ │ ├── carlist.go
│ │ ├── carlist_test.go
│ │ ├── carlist_test_data.html
│ │ ├── carmodel.go
│ │ ├── carmodel_test.go
│ │ └── carmodel_test_data.html
│ └── zhenai/
│ └── parser/
│ ├── city.go
│ ├── citylist.go
│ ├── citylist_test.go
│ ├── citylist_test_data.html
│ ├── profile.go
│ ├── profile_test.go
│ └── profile_test_data.html
├── crawler_distributed/
│ ├── config/
│ │ └── config.go
│ ├── main.go
│ ├── persist/
│ │ ├── client/
│ │ │ └── itemsaver.go
│ │ ├── rpc.go
│ │ └── server/
│ │ ├── client_test.go
│ │ └── itemsaver.go
│ ├── rpcsupport/
│ │ └── rpc.go
│ └── worker/
│ ├── client/
│ │ └── worker.go
│ ├── rpc.go
│ ├── server/
│ │ ├── client_test.go
│ │ └── worker.go
│ └── types.go
├── go.mod
├── go.sum
├── lang/
│ ├── basic/
│ │ ├── atomic/
│ │ │ └── atomic.go
│ │ ├── basic/
│ │ │ ├── basic.go
│ │ │ └── triangle_test.go
│ │ ├── branch/
│ │ │ ├── abc.txt
│ │ │ └── branch.go
│ │ ├── func/
│ │ │ └── func.go
│ │ ├── loop/
│ │ │ └── loop.go
│ │ └── regex/
│ │ └── regex.go
│ ├── channel/
│ │ ├── channel.go
│ │ ├── done/
│ │ │ └── done.go
│ │ ├── pattern/
│ │ │ └── main.go
│ │ └── select/
│ │ └── select.go
│ ├── container/
│ │ ├── arrays/
│ │ │ └── arrays.go
│ │ ├── maps/
│ │ │ └── maps.go
│ │ ├── nonrepeatingsubstr/
│ │ │ ├── nonrepeating.go
│ │ │ └── nonrepeating_test.go
│ │ ├── slices/
│ │ │ ├── sliceops.go
│ │ │ └── slices.go
│ │ └── strings/
│ │ └── strings.go
│ ├── errhandling/
│ │ ├── defer/
│ │ │ └── defer.go
│ │ ├── filelistingserver/
│ │ │ ├── errwrapper_test.go
│ │ │ ├── filelisting/
│ │ │ │ └── handler.go
│ │ │ └── web.go
│ │ └── recover/
│ │ └── recover.go
│ ├── functional/
│ │ ├── adder/
│ │ │ └── adder.go
│ │ ├── fib/
│ │ │ └── fib.go
│ │ └── main.go
│ ├── goroutine/
│ │ └── goroutine.go
│ ├── http/
│ │ ├── client.go
│ │ └── gindemo/
│ │ └── ginserver.go
│ ├── json/
│ │ └── main.go
│ ├── maze/
│ │ ├── maze.go
│ │ └── maze.in
│ ├── queue/
│ │ ├── queue.go
│ │ ├── queue_test.go
│ │ └── queueentry/
│ │ └── main.go
│ ├── retriever/
│ │ ├── main.go
│ │ ├── mock/
│ │ │ └── mockretriever.go
│ │ └── real/
│ │ └── retriever.go
│ ├── rpc/
│ │ ├── client/
│ │ │ └── main.go
│ │ ├── rpc.go
│ │ └── server/
│ │ └── main.go
│ └── tree/
│ ├── node.go
│ ├── traversal.go
│ ├── treeentry/
│ │ └── entry.go
│ └── treeentry_embedded/
│ └── entry.go
└── mockserver/
├── config/
│ └── config.go
├── generator/
│ ├── city/
│ │ ├── city.go
│ │ ├── city_test.go
│ │ └── city_tmpl.html
│ ├── citylist/
│ │ ├── citylist.go
│ │ ├── citylist_test.go
│ │ └── citylist_tmpl.html
│ └── profile/
│ ├── profile.go
│ ├── profile_test.go
│ └── profile_tmpl.html
├── main.go
├── recommendation/
│ ├── rcmd.go
│ └── rcmd_test.go
└── static/
├── css/
│ └── blog.css
├── index.html
└── instructions.html
================================================
FILE CONTENTS
================================================
================================================
FILE: .gitattributes
================================================
*.html linguist-language=go
*.css linguist-language=go
*.js linguist-language=go
================================================
FILE: .gitignore
================================================
================================================
FILE: README.md
================================================
Interesting things start from viewing forks.
================================================
FILE: crawler/config/config.go
================================================
package config
const (
// Parser names
ParseCity = "ParseCity"
ParseCityList = "ParseCityList"
ParseProfile = "ParseProfile"
ParseCarDetail = "ParseCarDetail"
ParseCarList = "ParseCarList"
ParseCarModel = "ParseCarModel"
NilParser = "NilParser"
// ElasticSearch
ElasticIndex = "car_profile"
// Rate limiting
Qps = 2
)
================================================
FILE: crawler/engine/concurrent.go
================================================
package engine
type ConcurrentEngine struct {
Scheduler Scheduler
WorkerCount int
ItemChan chan Item
RequestProcessor Processor
}
type Processor func(Request) (ParseResult, error)
type Scheduler interface {
ReadyNotifier
Submit(Request)
WorkerChan() chan Request
Run()
}
type ReadyNotifier interface {
WorkerReady(chan Request)
}
func (e *ConcurrentEngine) Run(seeds ...Request) {
out := make(chan ParseResult)
e.Scheduler.Run()
for i := 0; i < e.WorkerCount; i++ {
e.createWorker(e.Scheduler.WorkerChan(),
out, e.Scheduler)
}
for _, r := range seeds {
if isDuplicate(r.Url) {
continue
}
e.Scheduler.Submit(r)
}
for {
result := <-out
for _, item := range result.Items {
go func(i Item) {
e.ItemChan <- i
}(item)
}
for _, request := range result.Requests {
if isDuplicate(request.Url) {
continue
}
e.Scheduler.Submit(request)
}
}
}
func (e *ConcurrentEngine) createWorker(
in chan Request,
out chan ParseResult, ready ReadyNotifier) {
go func() {
for {
ready.WorkerReady(in)
request := <-in
result, err := e.RequestProcessor(
request)
if err != nil {
continue
}
out <- result
}
}()
}
var visitedUrls = make(map[string]bool)
func isDuplicate(url string) bool {
if visitedUrls[url] {
return true
}
visitedUrls[url] = true
return false
}
================================================
FILE: crawler/engine/simple.go
================================================
package engine
import (
"log"
)
type SimpleEngine struct{}
func (e SimpleEngine) Run(seeds ...Request) {
var requests []Request
for _, r := range seeds {
requests = append(requests, r)
}
for len(requests) > 0 {
r := requests[0]
requests = requests[1:]
parseResult, err := Worker(r)
if err != nil {
continue
}
requests = append(requests,
parseResult.Requests...)
for _, item := range parseResult.Items {
log.Printf("Got item: %v", item)
}
}
}
================================================
FILE: crawler/engine/types.go
================================================
package engine
import "imooc.com/ccmouse/learngo/crawler/config"
type ParserFunc func(
contents []byte, url string) ParseResult
type Parser interface {
Parse(contents []byte, url string) ParseResult
Serialize() (name string, args interface{})
}
type Request struct {
Url string
Parser Parser
}
type ParseResult struct {
Requests []Request
Items []Item
}
type Item struct {
Url string
Type string
Id string
Payload interface{}
}
type NilParser struct{}
func (NilParser) Parse(
_ []byte, _ string) ParseResult {
return ParseResult{}
}
func (NilParser) Serialize() (
name string, args interface{}) {
return config.NilParser, nil
}
type FuncParser struct {
parser ParserFunc
name string
}
func (f *FuncParser) Parse(
contents []byte, url string) ParseResult {
return f.parser(contents, url)
}
func (f *FuncParser) Serialize() (
name string, args interface{}) {
return f.name, nil
}
func NewFuncParser(
p ParserFunc, name string) *FuncParser {
return &FuncParser{
parser: p,
name: name,
}
}
================================================
FILE: crawler/engine/worker.go
================================================
package engine
import (
"log"
"imooc.com/ccmouse/learngo/crawler/fetcher"
)
func Worker(r Request) (ParseResult, error) {
body, err := fetcher.Fetch(r.Url)
if err != nil {
log.Printf("Fetcher: error "+
"fetching url %s: %v",
r.Url, err)
return ParseResult{}, err
}
return r.Parser.Parse(body, r.Url), nil
}
================================================
FILE: crawler/fetcher/fetcher.go
================================================
package fetcher
import (
"bufio"
"fmt"
"io/ioutil"
"net/http"
"log"
"time"
"golang.org/x/net/html/charset"
"golang.org/x/text/encoding"
"golang.org/x/text/encoding/unicode"
"golang.org/x/text/transform"
"imooc.com/ccmouse/learngo/crawler/config"
)
var (
rateLimiter = time.Tick(
time.Second / config.Qps)
verboseLogging = false
)
func SetVerboseLogging() {
verboseLogging = true
}
func Fetch(url string) ([]byte, error) {
<-rateLimiter
if verboseLogging {
log.Printf("Fetching url %s", url)
}
resp, err := http.Get(url)
if err != nil {
return nil, err
}
defer resp.Body.Close()
if resp.StatusCode != http.StatusOK {
return nil,
fmt.Errorf("wrong status code: %d",
resp.StatusCode)
}
bodyReader := bufio.NewReader(resp.Body)
e := determineEncoding(bodyReader)
utf8Reader := transform.NewReader(bodyReader,
e.NewDecoder())
return ioutil.ReadAll(utf8Reader)
}
func determineEncoding(
r *bufio.Reader) encoding.Encoding {
bytes, err := r.Peek(1024)
if err != nil {
log.Printf("Fetcher error: %v", err)
return unicode.UTF8
}
e, _, _ := charset.DetermineEncoding(
bytes, "")
return e
}
================================================
FILE: crawler/frontend/controller/searchresult.go
================================================
package controller
import (
"context"
"net/http"
"reflect"
"regexp"
"strconv"
"strings"
"github.com/olivere/elastic/v7"
"imooc.com/ccmouse/learngo/crawler/config"
"imooc.com/ccmouse/learngo/crawler/engine"
"imooc.com/ccmouse/learngo/crawler/frontend/model"
"imooc.com/ccmouse/learngo/crawler/frontend/view"
)
type SearchResultHandler struct {
view view.SearchResultView
client *elastic.Client
}
func CreateSearchResultHandler(
template string) SearchResultHandler {
client, err := elastic.NewClient(
elastic.SetSniff(false))
if err != nil {
panic(err)
}
return SearchResultHandler{
view: view.CreateSearchResultView(
template),
client: client,
}
}
func (h SearchResultHandler) ServeHTTP(
w http.ResponseWriter, req *http.Request) {
q := strings.TrimSpace(req.FormValue("q"))
from, err := strconv.Atoi(
req.FormValue("from"))
if err != nil {
from = 0
}
page, err := h.getSearchResult(q, from)
if err != nil {
http.Error(w, err.Error(),
http.StatusBadRequest)
return
}
err = h.view.Render(w, page)
if err != nil {
http.Error(w, err.Error(),
http.StatusBadRequest)
return
}
}
const pageSize = 10
func (h SearchResultHandler) getSearchResult(
q string, from int) (model.SearchResult, error) {
var result model.SearchResult
result.Query = q
resp, err := h.client.
Search(config.ElasticIndex).
Query(elastic.NewQueryStringQuery(
rewriteQueryString(q))).
From(from).
Do(context.Background())
if err != nil {
return result, err
}
result.Hits = resp.TotalHits()
result.Start = from
result.Items = resp.Each(
reflect.TypeOf(engine.Item{}))
if result.Start == 0 {
result.PrevFrom = -1
} else {
result.PrevFrom =
(result.Start - 1) /
pageSize * pageSize
}
result.NextFrom =
result.Start + len(result.Items)
return result, nil
}
// Rewrites query string. Replaces field names
// like "Age" to "Payload.Age"
func rewriteQueryString(q string) string {
re := regexp.MustCompile(`([A-Z][a-z]*):`)
return re.ReplaceAllString(q, "Payload.$1:")
}
================================================
FILE: crawler/frontend/model/page.go
================================================
package model
type SearchResult struct {
Hits int64
Start int
Query string
PrevFrom int
NextFrom int
Items []interface{}
}
================================================
FILE: crawler/frontend/starter.go
================================================
package main
import (
"net/http"
"imooc.com/ccmouse/learngo/crawler/frontend/controller"
)
func main() {
http.Handle("/", http.FileServer(
http.Dir("crawler/frontend/view")))
http.Handle("/search",
controller.CreateSearchResultHandler(
"crawler/frontend/view/template.html"))
err := http.ListenAndServe(":8888", nil)
if err != nil {
panic(err)
}
}
================================================
FILE: crawler/frontend/view/css/style.css
================================================
/* -- import Roboto Font ---------------------------- */
@import "https://fonts.googleapis.com/css?family=Roboto:400,100,100italic,300,300italic,400italic,500,500italic,700,700italic,900,900italic&subset=latin,cyrillic";
/* -- You can use this tables in Bootstrap (v3) projects. -- */
/* -- Box model ------------------------------- */
*,
*:after,
*:before {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
/* -- Demo style ------------------------------- */
html,
body {
position: relative;
min-height: 100%;
height: 100%;
}
html {
position: relative;
overflow-x: hidden;
margin: 16px;
padding: 0;
min-height: 100%;
font-size: 62.5%;
}
body {
font-family: 'RobotoDraft', 'Roboto', 'Helvetica Neue, Helvetica, Arial', sans-serif;
font-style: normal;
font-weight: 300;
font-size: 1.4rem;
line-height: 2rem;
letter-spacing: 0.01rem;
color: #212121;
background-color: #f5f5f5;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
text-rendering: optimizeLegibility;
}
#demo {
margin: 20px auto;
max-width: 1200px;
}
#demo h1 {
font-size: 2.4rem;
line-height: 3.2rem;
letter-spacing: 0;
font-weight: 300;
color: #212121;
text-transform: inherit;
margin-bottom: 1rem;
text-align: center;
}
#demo h2 {
font-size: 1.5rem;
line-height: 2.8rem;
letter-spacing: 0.01rem;
font-weight: 400;
color: #212121;
text-align: center;
}
.shadow-z-1 {
-webkit-box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.12), 0 1px 2px 0 rgba(0, 0, 0, 0.24);
-moz-box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.12), 0 1px 2px 0 rgba(0, 0, 0, 0.24);
box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.12), 0 1px 2px 0 rgba(0, 0, 0, 0.24);
}
/* -- Material Design Table style -------------- */
.table {
width: 100%;
max-width: 100%;
margin-bottom: 2rem;
background-color: #fff;
}
.table > thead > tr,
.table > tbody > tr,
.table > tfoot > tr {
-webkit-transition: all 0.3s ease;
-o-transition: all 0.3s ease;
transition: all 0.3s ease;
}
.table > thead > tr > th,
.table > tbody > tr > th,
.table > tfoot > tr > th,
.table > thead > tr > td,
.table > tbody > tr > td,
.table > tfoot > tr > td {
text-align: left;
padding: 1.6rem;
vertical-align: top;
border-top: 0;
-webkit-transition: all 0.3s ease;
-o-transition: all 0.3s ease;
transition: all 0.3s ease;
}
.table > thead > tr > th {
font-weight: 400;
color: #757575;
vertical-align: bottom;
border-bottom: 1px solid rgba(0, 0, 0, 0.12);
}
.table > caption + thead > tr:first-child > th,
.table > colgroup + thead > tr:first-child > th,
.table > thead:first-child > tr:first-child > th,
.table > caption + thead > tr:first-child > td,
.table > colgroup + thead > tr:first-child > td,
.table > thead:first-child > tr:first-child > td {
border-top: 0;
}
.table > tbody + tbody {
border-top: 1px solid rgba(0, 0, 0, 0.12);
}
.table .table {
background-color: #fff;
}
.table .no-border {
border: 0;
}
.table-condensed > thead > tr > th,
.table-condensed > tbody > tr > th,
.table-condensed > tfoot > tr > th,
.table-condensed > thead > tr > td,
.table-condensed > tbody > tr > td,
.table-condensed > tfoot > tr > td {
padding: 0.8rem;
}
.table-bordered {
border: 0;
}
.table-bordered > thead > tr > th,
.table-bordered > tbody > tr > th,
.table-bordered > tfoot > tr > th,
.table-bordered > thead > tr > td,
.table-bordered > tbody > tr > td,
.table-bordered > tfoot > tr > td {
border: 0;
border-bottom: 1px solid #e0e0e0;
}
.table-bordered > thead > tr > th,
.table-bordered > thead > tr > td {
border-bottom-width: 2px;
}
.table-striped > tbody > tr:nth-child(odd) > td,
.table-striped > tbody > tr:nth-child(odd) > th {
background-color: #f5f5f5;
}
.table-hover > tbody > tr:hover > td,
.table-hover > tbody > tr:hover > th {
background-color: rgba(0, 0, 0, 0.12);
}
@media screen and (max-width: 768px) {
.table-responsive-vertical > .table {
margin-bottom: 0;
background-color: transparent;
}
.table-responsive-vertical > .table > thead,
.table-responsive-vertical > .table > tfoot {
display: none;
}
.table-responsive-vertical > .table > tbody {
display: block;
}
.table-responsive-vertical > .table > tbody > tr {
display: block;
border: 1px solid #e0e0e0;
border-radius: 2px;
margin-bottom: 1.6rem;
}
.table-responsive-vertical > .table > tbody > tr > td {
background-color: #fff;
display: block;
vertical-align: middle;
text-align: right;
}
.table-responsive-vertical > .table > tbody > tr > td[data-title]:before {
content: attr(data-title);
float: left;
font-size: inherit;
font-weight: 400;
color: #757575;
}
.table-responsive-vertical.shadow-z-1 {
-webkit-box-shadow: none;
-moz-box-shadow: none;
box-shadow: none;
}
.table-responsive-vertical.shadow-z-1 > .table > tbody > tr {
border: none;
-webkit-box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.12), 0 1px 2px 0 rgba(0, 0, 0, 0.24);
-moz-box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.12), 0 1px 2px 0 rgba(0, 0, 0, 0.24);
box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.12), 0 1px 2px 0 rgba(0, 0, 0, 0.24);
}
.table-responsive-vertical > .table-bordered {
border: 0;
}
.table-responsive-vertical > .table-bordered > tbody > tr > td {
border: 0;
border-bottom: 1px solid #e0e0e0;
}
.table-responsive-vertical > .table-bordered > tbody > tr > td:last-child {
border-bottom: 0;
}
.table-responsive-vertical > .table-striped > tbody > tr > td,
.table-responsive-vertical > .table-striped > tbody > tr:nth-child(odd) {
background-color: #fff;
}
.table-responsive-vertical > .table-striped > tbody > tr > td:nth-child(odd) {
background-color: #f5f5f5;
}
.table-responsive-vertical > .table-hover > tbody > tr:hover > td,
.table-responsive-vertical > .table-hover > tbody > tr:hover {
background-color: #fff;
}
.table-responsive-vertical > .table-hover > tbody > tr > td:hover {
background-color: rgba(0, 0, 0, 0.12);
}
}
.table-striped.table-mc-red > tbody > tr:nth-child(odd) > td,
.table-striped.table-mc-red > tbody > tr:nth-child(odd) > th {
background-color: #fde0dc;
}
.table-hover.table-mc-red > tbody > tr:hover > td,
.table-hover.table-mc-red > tbody > tr:hover > th {
background-color: #f9bdbb;
}
@media screen and (max-width: 767px) {
.table-responsive-vertical .table-striped.table-mc-red > tbody > tr > td,
.table-responsive-vertical .table-striped.table-mc-red > tbody > tr:nth-child(odd) {
background-color: #fff;
}
.table-responsive-vertical .table-striped.table-mc-red > tbody > tr > td:nth-child(odd) {
background-color: #fde0dc;
}
.table-responsive-vertical .table-hover.table-mc-red > tbody > tr:hover > td,
.table-responsive-vertical .table-hover.table-mc-red > tbody > tr:hover {
background-color: #fff;
}
.table-responsive-vertical .table-hover.table-mc-red > tbody > tr > td:hover {
background-color: #f9bdbb;
}
}
.table-striped.table-mc-pink > tbody > tr:nth-child(odd) > td,
.table-striped.table-mc-pink > tbody > tr:nth-child(odd) > th {
background-color: #fce4ec;
}
.table-hover.table-mc-pink > tbody > tr:hover > td,
.table-hover.table-mc-pink > tbody > tr:hover > th {
background-color: #f8bbd0;
}
@media screen and (max-width: 767px) {
.table-responsive-vertical .table-striped.table-mc-pink > tbody > tr > td,
.table-responsive-vertical .table-striped.table-mc-pink > tbody > tr:nth-child(odd) {
background-color: #fff;
}
.table-responsive-vertical .table-striped.table-mc-pink > tbody > tr > td:nth-child(odd) {
background-color: #fce4ec;
}
.table-responsive-vertical .table-hover.table-mc-pink > tbody > tr:hover > td,
.table-responsive-vertical .table-hover.table-mc-pink > tbody > tr:hover {
background-color: #fff;
}
.table-responsive-vertical .table-hover.table-mc-pink > tbody > tr > td:hover {
background-color: #f8bbd0;
}
}
.table-striped.table-mc-purple > tbody > tr:nth-child(odd) > td,
.table-striped.table-mc-purple > tbody > tr:nth-child(odd) > th {
background-color: #f3e5f5;
}
.table-hover.table-mc-purple > tbody > tr:hover > td,
.table-hover.table-mc-purple > tbody > tr:hover > th {
background-color: #e1bee7;
}
@media screen and (max-width: 767px) {
.table-responsive-vertical .table-striped.table-mc-purple > tbody > tr > td,
.table-responsive-vertical .table-striped.table-mc-purple > tbody > tr:nth-child(odd) {
background-color: #fff;
}
.table-responsive-vertical .table-striped.table-mc-purple > tbody > tr > td:nth-child(odd) {
background-color: #f3e5f5;
}
.table-responsive-vertical .table-hover.table-mc-purple > tbody > tr:hover > td,
.table-responsive-vertical .table-hover.table-mc-purple > tbody > tr:hover {
background-color: #fff;
}
.table-responsive-vertical .table-hover.table-mc-purple > tbody > tr > td:hover {
background-color: #e1bee7;
}
}
.table-striped.table-mc-deep-purple > tbody > tr:nth-child(odd) > td,
.table-striped.table-mc-deep-purple > tbody > tr:nth-child(odd) > th {
background-color: #ede7f6;
}
.table-hover.table-mc-deep-purple > tbody > tr:hover > td,
.table-hover.table-mc-deep-purple > tbody > tr:hover > th {
background-color: #d1c4e9;
}
@media screen and (max-width: 767px) {
.table-responsive-vertical .table-striped.table-mc-deep-purple > tbody > tr > td,
.table-responsive-vertical .table-striped.table-mc-deep-purple > tbody > tr:nth-child(odd) {
background-color: #fff;
}
.table-responsive-vertical .table-striped.table-mc-deep-purple > tbody > tr > td:nth-child(odd) {
background-color: #ede7f6;
}
.table-responsive-vertical .table-hover.table-mc-deep-purple > tbody > tr:hover > td,
.table-responsive-vertical .table-hover.table-mc-deep-purple > tbody > tr:hover {
background-color: #fff;
}
.table-responsive-vertical .table-hover.table-mc-deep-purple > tbody > tr > td:hover {
background-color: #d1c4e9;
}
}
.table-striped.table-mc-indigo > tbody > tr:nth-child(odd) > td,
.table-striped.table-mc-indigo > tbody > tr:nth-child(odd) > th {
background-color: #e8eaf6;
}
.table-hover.table-mc-indigo > tbody > tr:hover > td,
.table-hover.table-mc-indigo > tbody > tr:hover > th {
background-color: #c5cae9;
}
@media screen and (max-width: 767px) {
.table-responsive-vertical .table-striped.table-mc-indigo > tbody > tr > td,
.table-responsive-vertical .table-striped.table-mc-indigo > tbody > tr:nth-child(odd) {
background-color: #fff;
}
.table-responsive-vertical .table-striped.table-mc-indigo > tbody > tr > td:nth-child(odd) {
background-color: #e8eaf6;
}
.table-responsive-vertical .table-hover.table-mc-indigo > tbody > tr:hover > td,
.table-responsive-vertical .table-hover.table-mc-indigo > tbody > tr:hover {
background-color: #fff;
}
.table-responsive-vertical .table-hover.table-mc-indigo > tbody > tr > td:hover {
background-color: #c5cae9;
}
}
.table-striped.table-mc-blue > tbody > tr:nth-child(odd) > td,
.table-striped.table-mc-blue > tbody > tr:nth-child(odd) > th {
background-color: #e7e9fd;
}
.table-hover.table-mc-blue > tbody > tr:hover > td,
.table-hover.table-mc-blue > tbody > tr:hover > th {
background-color: #d0d9ff;
}
@media screen and (max-width: 767px) {
.table-responsive-vertical .table-striped.table-mc-blue > tbody > tr > td,
.table-responsive-vertical .table-striped.table-mc-blue > tbody > tr:nth-child(odd) {
background-color: #fff;
}
.table-responsive-vertical .table-striped.table-mc-blue > tbody > tr > td:nth-child(odd) {
background-color: #e7e9fd;
}
.table-responsive-vertical .table-hover.table-mc-blue > tbody > tr:hover > td,
.table-responsive-vertical .table-hover.table-mc-blue > tbody > tr:hover {
background-color: #fff;
}
.table-responsive-vertical .table-hover.table-mc-blue > tbody > tr > td:hover {
background-color: #d0d9ff;
}
}
.table-striped.table-mc-light-blue > tbody > tr:nth-child(odd) > td,
.table-striped.table-mc-light-blue > tbody > tr:nth-child(odd) > th {
background-color: #e1f5fe;
}
.table-hover.table-mc-light-blue > tbody > tr:hover > td,
.table-hover.table-mc-light-blue > tbody > tr:hover > th {
background-color: #b3e5fc;
}
@media screen and (max-width: 767px) {
.table-responsive-vertical .table-striped.table-mc-light-blue > tbody > tr > td,
.table-responsive-vertical .table-striped.table-mc-light-blue > tbody > tr:nth-child(odd) {
background-color: #fff;
}
.table-responsive-vertical .table-striped.table-mc-light-blue > tbody > tr > td:nth-child(odd) {
background-color: #e1f5fe;
}
.table-responsive-vertical .table-hover.table-mc-light-blue > tbody > tr:hover > td,
.table-responsive-vertical .table-hover.table-mc-light-blue > tbody > tr:hover {
background-color: #fff;
}
.table-responsive-vertical .table-hover.table-mc-light-blue > tbody > tr > td:hover {
background-color: #b3e5fc;
}
}
.table-striped.table-mc-cyan > tbody > tr:nth-child(odd) > td,
.table-striped.table-mc-cyan > tbody > tr:nth-child(odd) > th {
background-color: #e0f7fa;
}
.table-hover.table-mc-cyan > tbody > tr:hover > td,
.table-hover.table-mc-cyan > tbody > tr:hover > th {
background-color: #b2ebf2;
}
@media screen and (max-width: 767px) {
.table-responsive-vertical .table-striped.table-mc-cyan > tbody > tr > td,
.table-responsive-vertical .table-striped.table-mc-cyan > tbody > tr:nth-child(odd) {
background-color: #fff;
}
.table-responsive-vertical .table-striped.table-mc-cyan > tbody > tr > td:nth-child(odd) {
background-color: #e0f7fa;
}
.table-responsive-vertical .table-hover.table-mc-cyan > tbody > tr:hover > td,
.table-responsive-vertical .table-hover.table-mc-cyan > tbody > tr:hover {
background-color: #fff;
}
.table-responsive-vertical .table-hover.table-mc-cyan > tbody > tr > td:hover {
background-color: #b2ebf2;
}
}
.table-striped.table-mc-teal > tbody > tr:nth-child(odd) > td,
.table-striped.table-mc-teal > tbody > tr:nth-child(odd) > th {
background-color: #e0f2f1;
}
.table-hover.table-mc-teal > tbody > tr:hover > td,
.table-hover.table-mc-teal > tbody > tr:hover > th {
background-color: #b2dfdb;
}
@media screen and (max-width: 767px) {
.table-responsive-vertical .table-striped.table-mc-teal > tbody > tr > td,
.table-responsive-vertical .table-striped.table-mc-teal > tbody > tr:nth-child(odd) {
background-color: #fff;
}
.table-responsive-vertical .table-striped.table-mc-teal > tbody > tr > td:nth-child(odd) {
background-color: #e0f2f1;
}
.table-responsive-vertical .table-hover.table-mc-teal > tbody > tr:hover > td,
.table-responsive-vertical .table-hover.table-mc-teal > tbody > tr:hover {
background-color: #fff;
}
.table-responsive-vertical .table-hover.table-mc-teal > tbody > tr > td:hover {
background-color: #b2dfdb;
}
}
.table-striped.table-mc-green > tbody > tr:nth-child(odd) > td,
.table-striped.table-mc-green > tbody > tr:nth-child(odd) > th {
background-color: #d0f8ce;
}
.table-hover.table-mc-green > tbody > tr:hover > td,
.table-hover.table-mc-green > tbody > tr:hover > th {
background-color: #a3e9a4;
}
@media screen and (max-width: 767px) {
.table-responsive-vertical .table-striped.table-mc-green > tbody > tr > td,
.table-responsive-vertical .table-striped.table-mc-green > tbody > tr:nth-child(odd) {
background-color: #fff;
}
.table-responsive-vertical .table-striped.table-mc-green > tbody > tr > td:nth-child(odd) {
background-color: #d0f8ce;
}
.table-responsive-vertical .table-hover.table-mc-green > tbody > tr:hover > td,
.table-responsive-vertical .table-hover.table-mc-green > tbody > tr:hover {
background-color: #fff;
}
.table-responsive-vertical .table-hover.table-mc-green > tbody > tr > td:hover {
background-color: #a3e9a4;
}
}
.table-striped.table-mc-light-green > tbody > tr:nth-child(odd) > td,
.table-striped.table-mc-light-green > tbody > tr:nth-child(odd) > th {
background-color: #f1f8e9;
}
.table-hover.table-mc-light-green > tbody > tr:hover > td,
.table-hover.table-mc-light-green > tbody > tr:hover > th {
background-color: #dcedc8;
}
@media screen and (max-width: 767px) {
.table-responsive-vertical .table-striped.table-mc-light-green > tbody > tr > td,
.table-responsive-vertical .table-striped.table-mc-light-green > tbody > tr:nth-child(odd) {
background-color: #fff;
}
.table-responsive-vertical .table-striped.table-mc-light-green > tbody > tr > td:nth-child(odd) {
background-color: #f1f8e9;
}
.table-responsive-vertical .table-hover.table-mc-light-green > tbody > tr:hover > td,
.table-responsive-vertical .table-hover.table-mc-light-green > tbody > tr:hover {
background-color: #fff;
}
.table-responsive-vertical .table-hover.table-mc-light-green > tbody > tr > td:hover {
background-color: #dcedc8;
}
}
.table-striped.table-mc-lime > tbody > tr:nth-child(odd) > td,
.table-striped.table-mc-lime > tbody > tr:nth-child(odd) > th {
background-color: #f9fbe7;
}
.table-hover.table-mc-lime > tbody > tr:hover > td,
.table-hover.table-mc-lime > tbody > tr:hover > th {
background-color: #f0f4c3;
}
@media screen and (max-width: 767px) {
.table-responsive-vertical .table-striped.table-mc-lime > tbody > tr > td,
.table-responsive-vertical .table-striped.table-mc-lime > tbody > tr:nth-child(odd) {
background-color: #fff;
}
.table-responsive-vertical .table-striped.table-mc-lime > tbody > tr > td:nth-child(odd) {
background-color: #f9fbe7;
}
.table-responsive-vertical .table-hover.table-mc-lime > tbody > tr:hover > td,
.table-responsive-vertical .table-hover.table-mc-lime > tbody > tr:hover {
background-color: #fff;
}
.table-responsive-vertical .table-hover.table-mc-lime > tbody > tr > td:hover {
background-color: #f0f4c3;
}
}
.table-striped.table-mc-yellow > tbody > tr:nth-child(odd) > td,
.table-striped.table-mc-yellow > tbody > tr:nth-child(odd) > th {
background-color: #fffde7;
}
.table-hover.table-mc-yellow > tbody > tr:hover > td,
.table-hover.table-mc-yellow > tbody > tr:hover > th {
background-color: #fff9c4;
}
@media screen and (max-width: 767px) {
.table-responsive-vertical .table-striped.table-mc-yellow > tbody > tr > td,
.table-responsive-vertical .table-striped.table-mc-yellow > tbody > tr:nth-child(odd) {
background-color: #fff;
}
.table-responsive-vertical .table-striped.table-mc-yellow > tbody > tr > td:nth-child(odd) {
background-color: #fffde7;
}
.table-responsive-vertical .table-hover.table-mc-yellow > tbody > tr:hover > td,
.table-responsive-vertical .table-hover.table-mc-yellow > tbody > tr:hover {
background-color: #fff;
}
.table-responsive-vertical .table-hover.table-mc-yellow > tbody > tr > td:hover {
background-color: #fff9c4;
}
}
.table-striped.table-mc-amber > tbody > tr:nth-child(odd) > td,
.table-striped.table-mc-amber > tbody > tr:nth-child(odd) > th {
background-color: #fff8e1;
}
.table-hover.table-mc-amber > tbody > tr:hover > td,
.table-hover.table-mc-amber > tbody > tr:hover > th {
background-color: #ffecb3;
}
@media screen and (max-width: 767px) {
.table-responsive-vertical .table-striped.table-mc-amber > tbody > tr > td,
.table-responsive-vertical .table-striped.table-mc-amber > tbody > tr:nth-child(odd) {
background-color: #fff;
}
.table-responsive-vertical .table-striped.table-mc-amber > tbody > tr > td:nth-child(odd) {
background-color: #fff8e1;
}
.table-responsive-vertical .table-hover.table-mc-amber > tbody > tr:hover > td,
.table-responsive-vertical .table-hover.table-mc-amber > tbody > tr:hover {
background-color: #fff;
}
.table-responsive-vertical .table-hover.table-mc-amber > tbody > tr > td:hover {
background-color: #ffecb3;
}
}
.table-striped.table-mc-orange > tbody > tr:nth-child(odd) > td,
.table-striped.table-mc-orange > tbody > tr:nth-child(odd) > th {
background-color: #fff3e0;
}
.table-hover.table-mc-orange > tbody > tr:hover > td,
.table-hover.table-mc-orange > tbody > tr:hover > th {
background-color: #ffe0b2;
}
@media screen and (max-width: 767px) {
.table-responsive-vertical .table-striped.table-mc-orange > tbody > tr > td,
.table-responsive-vertical .table-striped.table-mc-orange > tbody > tr:nth-child(odd) {
background-color: #fff;
}
.table-responsive-vertical .table-striped.table-mc-orange > tbody > tr > td:nth-child(odd) {
background-color: #fff3e0;
}
.table-responsive-vertical .table-hover.table-mc-orange > tbody > tr:hover > td,
.table-responsive-vertical .table-hover.table-mc-orange > tbody > tr:hover {
background-color: #fff;
}
.table-responsive-vertical .table-hover.table-mc-orange > tbody > tr > td:hover {
background-color: #ffe0b2;
}
}
.table-striped.table-mc-deep-orange > tbody > tr:nth-child(odd) > td,
.table-striped.table-mc-deep-orange > tbody > tr:nth-child(odd) > th {
background-color: #fbe9e7;
}
.table-hover.table-mc-deep-orange > tbody > tr:hover > td,
.table-hover.table-mc-deep-orange > tbody > tr:hover > th {
background-color: #ffccbc;
}
@media screen and (max-width: 767px) {
.table-responsive-vertical .table-striped.table-mc-deep-orange > tbody > tr > td,
.table-responsive-vertical .table-striped.table-mc-deep-orange > tbody > tr:nth-child(odd) {
background-color: #fff;
}
.table-responsive-vertical .table-striped.table-mc-deep-orange > tbody > tr > td:nth-child(odd) {
background-color: #fbe9e7;
}
.table-responsive-vertical .table-hover.table-mc-deep-orange > tbody > tr:hover > td,
.table-responsive-vertical .table-hover.table-mc-deep-orange > tbody > tr:hover {
background-color: #fff;
}
.table-responsive-vertical .table-hover.table-mc-deep-orange > tbody > tr > td:hover {
background-color: #ffccbc;
}
}
================================================
FILE: crawler/frontend/view/index.html
================================================
<!DOCTYPE html>
<html lang="en" >
<head>
<meta charset="UTF-8">
<script src="https://cdnjs.cloudflare.com/ajax/libs/modernizr/2.8.3/modernizr.min.js" type="text/javascript"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/5.0.0/normalize.min.css">
<link rel="stylesheet" href="css/style.css">
</head>
<body>
<div id="demo">
<div align="middle">
<img src="logo.png" width="320" height="240">
<form method="get" action="search">
<input type="text" maxlength="100" style="width: 500px; height: 30px;font-size: 16px;margin-top: 10px;" name="q">
<button type="submit" style="height: 30px">搜索</button>
</form>
</div>
</div>
<script src='http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script>
<script src="js/index.js"></script>
</body>
</html>
================================================
FILE: crawler/frontend/view/js/index.js
================================================
/**
* Created by Kupletsky Sergey on 05.11.14.
*
* Material Design Responsive Table
* Tested on Win8.1 with browsers: Chrome 37, Firefox 32, Opera 25, IE 11, Safari 5.1.7
* You can use this table in Bootstrap (v3) projects. Material Design Responsive Table CSS-style will override basic bootstrap style.
* JS used only for table constructor: you don't need it in your project
*/
$(document).ready(function() {
var table = $('#table');
// Table bordered
$('#table-bordered').change(function() {
var value = $( this ).val();
table.removeClass('table-bordered').addClass(value);
});
// Table striped
$('#table-striped').change(function() {
var value = $( this ).val();
table.removeClass('table-striped').addClass(value);
});
// Table hover
$('#table-hover').change(function() {
var value = $( this ).val();
table.removeClass('table-hover').addClass(value);
});
// Table color
$('#table-color').change(function() {
var value = $(this).val();
table.removeClass(/^table-mc-/).addClass(value);
});
});
// jQuery’s hasClass and removeClass on steroids
// by Nikita Vasilyev
// https://github.com/NV/jquery-regexp-classes
(function(removeClass) {
jQuery.fn.removeClass = function( value ) {
if ( value && typeof value.test === "function" ) {
for ( var i = 0, l = this.length; i < l; i++ ) {
var elem = this[i];
if ( elem.nodeType === 1 && elem.className ) {
var classNames = elem.className.split( /\s+/ );
for ( var n = classNames.length; n--; ) {
if ( value.test(classNames[n]) ) {
classNames.splice(n, 1);
}
}
elem.className = jQuery.trim( classNames.join(" ") );
}
}
} else {
removeClass.call(this, value);
}
return this;
}
})(jQuery.fn.removeClass);
================================================
FILE: crawler/frontend/view/searchresult.go
================================================
package view
import (
"html/template"
"io"
"imooc.com/ccmouse/learngo/crawler/frontend/model"
)
type SearchResultView struct {
template *template.Template
}
func CreateSearchResultView(
filename string) SearchResultView {
return SearchResultView{
template: template.Must(
template.ParseFiles(filename)),
}
}
func (s SearchResultView) Render(
w io.Writer, data model.SearchResult) error {
return s.template.Execute(w, data)
}
================================================
FILE: crawler/frontend/view/searchresult_test.go
================================================
package view
import (
"os"
"testing"
"imooc.com/ccmouse/learngo/crawler/engine"
"imooc.com/ccmouse/learngo/crawler/frontend/model"
common "imooc.com/ccmouse/learngo/crawler/model"
)
func TestSearchResultView_Render(t *testing.T) {
view := CreateSearchResultView(
"template.html")
out, err := os.Create("template.test.html")
if err != nil {
panic(err)
}
defer out.Close()
page := model.SearchResult{}
page.Hits = 123
item := engine.Item{
Url: "http://album.zhenai.com/u/108906739",
Type: "zhenai",
Id: "108906739",
Payload: common.Profile{
Age: 34,
Height: 162,
Weight: 57,
Income: "3001-5000元",
Gender: "女",
Name: "安静的雪",
Xinzuo: "牡羊座",
Occupation: "人事/行政",
Marriage: "离异",
House: "已购房",
Hokou: "山东菏泽",
Education: "大学本科",
Car: "未购车",
},
}
for i := 0; i < 10; i++ {
page.Items = append(page.Items, item)
}
err = view.Render(out, page)
if err != nil {
t.Error(err)
}
// TODO: verify contents in template.test.html
}
================================================
FILE: crawler/frontend/view/template.html
================================================
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<script src="https://cdnjs.cloudflare.com/ajax/libs/modernizr/2.8.3/modernizr.min.js"
type="text/javascript"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/5.0.0/normalize.min.css">
<link rel="stylesheet" href="css/style.css">
</head>
<body>
<div id="demo">
<div align="middle">
<form method="get">
<input type="text" maxlength="100" style="width: 500px" value="{{.Query}}" name="q">
<button type="submit">搜索</button>
</form>
</div>
<h2>共为你找到相关结果约为{{.Hits}}个。显示从{{.Start}}起共{{len .Items}}个。</h2>
<!-- Responsive table starts here -->
<!-- For correct display on small screens you must add 'data-title' to each 'td' in your table -->
<div class="table-responsive-vertical shadow-z-1">
<!-- Table starts here -->
<table id="table" class="table table-striped table-hover table-mc-indigo">
<tbody>
{{range .Items}}
{{if eq .Type "xcar"}}
<tr>
<td><a href="{{.Url}}">{{.Payload.Name}}</a></td>
{{with .Payload}}
<td>{{.Name}}</td>
<td>{{.Price}}万元</td>
<td>{{.Size}}</td>
<td>{{.Fuel}}L/100km</td>
<td>{{.Transmission}}</td>
<td>{{.Engine}}</td>
<td>{{.Displacement}}L</td>
<td>{{.MaxSpeed}}km/h</td>
<td>{{.Acceleration}}s,0-100km/h</td>
{{end}}
{{end}}
{{if eq .Type "zhenai"}}
<tr>
<td><a href="{{.Url}}">{{.Payload.Name}}</a></td>
{{with .Payload}}
<td>{{.Gender}}</td>
<td>{{.Age}}</td>
<td>{{.Height}}cm</td>
<td>{{.Weight}}kg</td>
<td>{{.Income}}</td>
<td>{{.Education}}</td>
<td>{{.Occupation}}</td>
<td>{{.Hokou}}</td>
<td>{{.Xinzuo}}</td>
<td>{{.House}}</td>
<td>{{.Car}}</td>
{{end}}
</tr>
{{end}}
{{else}}
<div>没有找到相关用户</div>
{{end}}
</tbody>
</table>
<div align="middle">
{{if ge .PrevFrom 0}}
<a href="search?q={{.Query}}&from={{.PrevFrom}}">上一页</a>
{{end}}
<a href="search?q={{.Query}}&from={{.NextFrom}}">下一页</a>
</div>
</div>
</div>
<script src='http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script>
<script src="js/index.js"></script>
</body>
</html>
================================================
FILE: crawler/main.go
================================================
package main
import (
"imooc.com/ccmouse/learngo/crawler/config"
"imooc.com/ccmouse/learngo/crawler/engine"
"imooc.com/ccmouse/learngo/crawler/persist"
"imooc.com/ccmouse/learngo/crawler/scheduler"
"imooc.com/ccmouse/learngo/crawler/zhenai/parser"
)
func main() {
itemChan, err := persist.ItemSaver(
config.ElasticIndex)
if err != nil {
panic(err)
}
e := engine.ConcurrentEngine{
Scheduler: &scheduler.QueuedScheduler{},
WorkerCount: 100,
ItemChan: itemChan,
RequestProcessor: engine.Worker,
}
e.Run(engine.Request{
Url: "http://localhost:8080/mock/www.zhenai.com/zhenghun",
Parser: engine.NewFuncParser(
parser.ParseCityList,
config.ParseCityList),
})
}
================================================
FILE: crawler/model/car.go
================================================
package model
type Car struct {
Name string
Price float64
ImageURL string
Size string
Fuel float64
Transmission string
Engine string
Displacement float64 // 排量
MaxSpeed float64
Acceleration float64
}
================================================
FILE: crawler/model/profile.go
================================================
package model
import "encoding/json"
type Profile struct {
Name string
Gender string
Age int
Height int
Weight int
Income string
Marriage string
Education string
Occupation string
Hokou string
Xinzuo string
House string
Car string
}
func FromJsonObj(o interface{}) (Profile, error) {
var profile Profile
s, err := json.Marshal(o)
if err != nil {
return profile, err
}
err = json.Unmarshal(s, &profile)
return profile, err
}
================================================
FILE: crawler/persist/itemsaver.go
================================================
package persist
import (
"context"
"errors"
"log"
"github.com/olivere/elastic/v7"
"imooc.com/ccmouse/learngo/crawler/engine"
)
func ItemSaver(
index string) (chan engine.Item, error) {
client, err := elastic.NewClient(
// Must turn off sniff in docker
elastic.SetSniff(false))
if err != nil {
return nil, err
}
out := make(chan engine.Item)
go func() {
itemCount := 0
for {
item := <-out
log.Printf("Item Saver: got item "+
"#%d: %v", itemCount, item)
itemCount++
err := Save(client, index, item)
if err != nil {
log.Printf("Item Saver: error "+
"saving item %v: %v",
item, err)
}
}
}()
return out, nil
}
func Save(
client *elastic.Client, index string,
item engine.Item) error {
if item.Type == "" {
return errors.New("must supply Type")
}
indexService := client.Index().
Index(index).
Type(item.Type).
BodyJson(item)
if item.Id != "" {
indexService.Id(item.Id)
}
_, err := indexService.
Do(context.Background())
return err
}
================================================
FILE: crawler/persist/itemsaver_test.go
================================================
package persist
import (
"context"
"encoding/json"
"testing"
"github.com/olivere/elastic/v7"
"imooc.com/ccmouse/learngo/crawler/engine"
"imooc.com/ccmouse/learngo/crawler/model"
)
func TestSave(t *testing.T) {
expected := engine.Item{
Url: "http://album.zhenai.com/u/108906739",
Type: "zhenai",
Id: "108906739",
Payload: model.Profile{
Age: 34,
Height: 162,
Weight: 57,
Income: "3001-5000元",
Gender: "女",
Name: "安静的雪",
Xinzuo: "牡羊座",
Occupation: "人事/行政",
Marriage: "离异",
House: "已购房",
Hokou: "山东菏泽",
Education: "大学本科",
Car: "未购车",
},
}
// TODO: Try to start up elastic search
// here using docker go client.
client, err := elastic.NewClient(
elastic.SetSniff(false))
if err != nil {
panic(err)
}
const index = "dating_test"
// Save expected item
err = Save(client, index, expected)
if err != nil {
panic(err)
}
// Fetch saved item
resp, err := client.Get().
Index(index).
Type(expected.Type).
Id(expected.Id).
Do(context.Background())
if err != nil {
panic(err)
}
t.Logf("%s", resp.Source)
var actual engine.Item
json.Unmarshal(resp.Source, &actual)
actualProfile, _ := model.FromJsonObj(
actual.Payload)
actual.Payload = actualProfile
// Verify result
if actual != expected {
t.Errorf("got %v; expected %v",
actual, expected)
}
}
================================================
FILE: crawler/scheduler/queued.go
================================================
package scheduler
import "imooc.com/ccmouse/learngo/crawler/engine"
type QueuedScheduler struct {
requestChan chan engine.Request
workerChan chan chan engine.Request
}
func (s *QueuedScheduler) WorkerChan() chan engine.Request {
return make(chan engine.Request)
}
func (s *QueuedScheduler) Submit(r engine.Request) {
s.requestChan <- r
}
func (s *QueuedScheduler) WorkerReady(
w chan engine.Request) {
s.workerChan <- w
}
func (s *QueuedScheduler) Run() {
s.workerChan = make(chan chan engine.Request)
s.requestChan = make(chan engine.Request)
go func() {
var requestQ []engine.Request
var workerQ []chan engine.Request
for {
var activeRequest engine.Request
var activeWorker chan engine.Request
if len(requestQ) > 0 &&
len(workerQ) > 0 {
activeWorker = workerQ[0]
activeRequest = requestQ[0]
}
select {
case r := <-s.requestChan:
requestQ = append(requestQ, r)
case w := <-s.workerChan:
workerQ = append(workerQ, w)
case activeWorker <- activeRequest:
workerQ = workerQ[1:]
requestQ = requestQ[1:]
}
}
}()
}
================================================
FILE: crawler/scheduler/simple.go
================================================
package scheduler
import "imooc.com/ccmouse/learngo/crawler/engine"
type SimpleScheduler struct {
workerChan chan engine.Request
}
func (s *SimpleScheduler) WorkerChan() chan engine.Request {
return s.workerChan
}
func (s *SimpleScheduler) WorkerReady(chan engine.Request) {
}
func (s *SimpleScheduler) Run() {
s.workerChan = make(chan engine.Request)
}
func (s *SimpleScheduler) Submit(
r engine.Request) {
go func() { s.workerChan <- r }()
}
================================================
FILE: crawler/xcar/parser/cardetail.go
================================================
package parser
import (
"fmt"
"regexp"
"strconv"
"imooc.com/ccmouse/learngo/crawler/engine"
"imooc.com/ccmouse/learngo/crawler/model"
)
var priceReTmpl = `<a href="/%s/baojia/".*>(\d+\.\d+)</a>`
var nameRe = regexp.MustCompile(`<title>【(.*)报价_图片_参数】.*</title>`)
var carImageRe = regexp.MustCompile(`<img class="color_car_img_new" src="([^"]+)"`)
var sizeRe = regexp.MustCompile(`<li.*车身尺寸.*<em>(\d+[^\d]\d+[^\d]\d+mm)`)
var fuelRe = regexp.MustCompile(`<li.*工信部油耗.*<em>(\d+\.\d+)L/100km`)
var transmissionRe = regexp.MustCompile(`<li.*变\s*速\s*箱.*<em>(.+)</em>`)
var engineRe = regexp.MustCompile(`发\s*动\s*机.*\s*.*<.*>(\d+kW[^<]*)<`)
var displacementRe = regexp.MustCompile(`<li.*排.*量.*(\d+\.\d+)L`)
var maxSpeedRe = regexp.MustCompile(`<td.*最高车速\(km/h\).*\s*<td[^>]*>(\d+)</td>`)
var accelRe = regexp.MustCompile(`<td.*0-100加速时间\(s\).*\s*<td[^>]*>([\d\.]+)</td>`)
var urlRe = regexp.MustCompile(`http://newcar.xcar.com.cn/(m\d+)/`)
func ParseCarDetail(contents []byte, url string) engine.ParseResult {
id := extractString([]byte(url), urlRe)
car := model.Car{
Name: extractString(contents, nameRe),
ImageURL: "http:" + extractString(contents, carImageRe),
Size: extractString(contents, sizeRe),
Fuel: extractFloat(contents, fuelRe),
Transmission: extractString(contents, transmissionRe),
Engine: extractString(contents, engineRe),
Displacement: extractFloat(contents, displacementRe),
MaxSpeed: extractFloat(contents, maxSpeedRe),
Acceleration: extractFloat(contents, accelRe),
}
priceRe, err := regexp.Compile(
fmt.Sprintf(priceReTmpl, regexp.QuoteMeta(id)))
if err == nil {
car.Price = extractFloat(contents, priceRe)
}
result := engine.ParseResult{
Items: []engine.Item{
{
Id: id,
Url: url,
Type: "xcar",
Payload: car,
},
},
}
carModelResult := ParseCarModel(contents, url)
result.Requests = carModelResult.Requests
return result
}
func extractString(
contents []byte, re *regexp.Regexp) string {
match := re.FindSubmatch(contents)
if len(match) >= 2 {
return string(match[1])
} else {
return ""
}
}
func extractFloat(contents []byte, re *regexp.Regexp) float64 {
f, err := strconv.ParseFloat(extractString(contents, re), 64)
if err != nil {
return 0
}
return f
}
================================================
FILE: crawler/xcar/parser/cardetail_test.go
================================================
package parser
import (
"io/ioutil"
"testing"
"imooc.com/ccmouse/learngo/crawler/engine"
"imooc.com/ccmouse/learngo/crawler/model"
)
func TestParseCarDetail(t *testing.T) {
contents, err := ioutil.ReadFile(
"cardetail_test_data.html")
if err != nil {
panic(err)
}
expectedItem := engine.Item{
Url: "http://newcar.xcar.com.cn/m35001/",
Type: "xcar",
Id: "m35001",
Payload: model.Car{
Name: "奥迪TT双门2017款45 TFSI",
Price: 47.18,
ImageURL: "http://img1.xcarimg.com/b63/s8386/m_20170616000036181753843373443.jpg-280x210.jpg",
Size: "4191×1832×1353mm",
Fuel: 16.7,
Transmission: "6挡双离合",
Engine: "169kW(2.0L涡轮增压)",
Displacement: 2,
MaxSpeed: 250,
Acceleration: 5.9,
},
}
result := ParseCarDetail(contents, "http://newcar.xcar.com.cn/m35001/")
if len(result.Items) != 1 {
t.Errorf("Must only return one item, but %d returned",
len(result.Items))
}
actualItem := result.Items[0]
if actualItem != expectedItem {
t.Errorf("expected item: %+v, but was %+v",
expectedItem, actualItem)
}
const resultSize = 8
expectedUrls := []string{
"http://newcar.xcar.com.cn/m45776/",
"http://newcar.xcar.com.cn/m45776/",
"http://newcar.xcar.com.cn/m32946/",
}
if len(result.Requests) != resultSize {
t.Errorf("result should have %d "+
"requests; but had %d",
resultSize, len(result.Requests))
}
for i, url := range expectedUrls {
if result.Requests[i].Url != url {
t.Errorf("expected url #%d: %s; but "+
"was %s",
i, url, result.Requests[i].Url)
}
}
}
================================================
FILE: crawler/xcar/parser/cardetail_test_data.html
================================================
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="GB2312">
<link rel="stylesheet" type="text/css" href="//icon.xcar.com.cn/2016/DemioModel/css/common.css?version=201913" />
<script type="text/javascript" src="//asserts.xcarimg.com/resource/newcar/ps/nav.js?v=201903061118"></script>
<title>【奥迪TT双门2017款45 TFSI报价_图片_参数】_奥迪(进口)奥迪TT双门怎么样_爱卡汽车</title>
<meta name="keywords" content="奥迪TT双门2017款45 TFSI报价, 奥迪TT双门2017款45 TFSI图片,奥迪(进口)奥迪TT双门怎么样,爱卡汽车" />
<meta name="description" content="爱卡汽车为您提供奥迪TT双门2017款45 TFSI最新报价,图片,参数配置,购车优惠,奥迪TT双门2017款45 TFSI车主点评及论坛精华等资讯内容,更多奥迪TT双门2017款45 TFSI精彩内容尽在爱卡汽车。" />
<meta name="mobile-agent" content="format=html5;url=https://a.xcar.com.cn/3/m35001/" />
<link rel="alternate" media="only screen and(max-width: 640px)" href="//a.xcar.com.cn/3/m35001/" >
<link rel="stylesheet" type="text/css" href="//icon.xcar.com.cn/min/?f=2011/header/css/2011nav.css&version=2015015" />
<link href="//icon.xcar.com.cn/2015/nav/css/channel_nav.css?v=20170922" rel="stylesheet" type="text/css"/>
<link rel="stylesheet" href="//icon.xcar.com.cn/2016/DemioModel/css/common.css" />
<link rel="stylesheet" href="//icon.xcar.com.cn/2016/DemioModel/css/model_v1.css?v=201809041442" />
<link rel="stylesheet" href="//asserts.xcarimg.com/resource/DemioModel/css/add_marks.css?v=201811271757" />
<link rel="stylesheet" type="text/css" href="//asserts.xcarimg.com/resource/DemioModel/css/loans_model.css?v=201904151017">
<link rel="stylesheet" type="text/css" href="//asserts.xcarimg.com/resource/DemioModel/css/comment_on_card_friends.css?v=201901281707" />
<script type="text/javascript" src="//icon.xcar.com.cn/2014/muban/js/jquery-1.8.3.min.js"></script>
<script type="text/javascript" src="//icon.xcar.com.cn/pub_js/city.js?v=3.201911.02"></script>
<!-- <script type="text/javascript" src="//icon.xcar.com.cn/min/?f=2011newcar/ps/ipLocationInfo.js"></script> -->
<script type="text/javascript" src="//icon.xcar.com.cn/pub_js/model_compare_new_selectcar.js?v=1"></script>
<script type="text/javascript">
var compare_clickcode = [124749,124748,124750,124751,124752,124753,124754,124755,124756,124757];
</script>
<!--<script type="text/javascript" src="//icon.xcar.com.cn/pub_js/model_compare_new.js?v=2017920"></script>-->
<script src="//asserts.xcarimg.com/resource/xcarBrand/js/model_compare_new.js?v=20191102"></script>
<!-- short_video start -->
<link rel="stylesheet" href="//asserts.xcarimg.com/resource/common/short_video/css/short_video.css?v=201909032013"/>
<link rel="stylesheet" type="text/css" href="//asserts.xcarimg.com/resource/DemioModel/css/short_video.css?v=201909041338"/>
<script src="//asserts.xcarimg.com/resource/common/short_video/js/short_video_gbk.js?v=201909051843"></script>
<script type="text/javascript">
$(function(){
// 短视频
shortVideoInit({
attention_url: "//newcar.xcar.com.cn/auto/index.php?r=service/AttentionApi/AddFollow", // 关注接口url
cancel_attention_url: "//newcar.xcar.com.cn/auto/index.php?r=service/AttentionApi/CancelFollow", // 取消关注接口url
});
})
</script>
<!-- short_video end -->
<style type="text/css">
.ad_775_90 { width: 775px;height: 90px;display: block;margin-top: 20px;}
.contrastcon ul li .tj_icon {
display: block;
width: 20px;
height: 20px;
background: url("//icon.xcar.com.cn/2015/newcar/images/zym_tj.jpg ") no-repeat;
position: absolute;
left: -1px;
top: -1px;
padding: 0;
}
</style>
<script type="text/javascript">
var pserid = "3",mid="35001";//重要
</script>
<script>
(function () {
var _protocol = (("https:" == document.location.protocol) ? " https://" : " http://");
var _phref="dw.xcar.com.cn/analytics.php?pserid=3";
document.write(unescape("%3Cscript async src='" + _protocol + _phref+"' type='text/javascript'%3E%3C/script%3E"));
})()
</script> </head>
<body><script type="text/javascript" src="//icon.xcar.com.cn/min/?f=newcar/ipLocationInfo_v1.js&v=2019.17.5.23.4"></script>
<!-- 头部框架 -->
<div id="div_newd0_js_2379" class="ismargintop"></div>
<script type="text/javascript" src="//dx0.xcar.com.cn/dsp/adpc?appId=M7nuyi&deviceType=2&posId=2379&site_page=newcar.xcar.com.cn/m35001/&site_ref=http://newcar.xcar.com.cn/3/&dx_ggw_series_id="></script><script type='text/javascript'>
try{
var nuaLower = navigator.userAgent.toLowerCase().toLocaleLowerCase();
if(nuaLower.match(/android|iphone|moblie/) && !nuaLower.match(/pad/))
{
document.write('<scr' + 'ipt src="//newcar.xcar.com.cn/js/Jump.js?t=' + new Date().getTime() + '"> <\/scri' + 'pt>');
}
}catch(e){}
</script>
<link href="//asserts.xcarimg.com/resource/common/header/channel_nav_utf.css?v=201908082036" rel="stylesheet"
type="text/css" />
<!--header-->
<!-- login-->
<div class="Header_bg" id="totop">
<div class="Header"> <a href="http://www.xcar.com.cn/" title="爱卡汽车" class="Hlogo"></a>
<div class="mmp menubox fr">
<div class="menutb"> <span class="iphone">手机爱卡</span> </div>
<div class="mmp_show"> <a href="http://app.xcar.com.cn/wap.htm" target="_blank" class="wap">触屏版</a> <a
href="http://app.xcar.com.cn/xcar.htm" target="_blank" class="xcar">爱卡汽车</a> <a
href="http://app.xcar.com.cn/carfinder.htm" target="_blank" class="carfinder">爱买车</a><span
class="weixin">爱卡微信<i></i></span> </div>
</div>
<!-- 论坛导航部分开始 -->
<div class="mbbs menubox fr" rel="xheaderbbsnavBox">
<div class="menutb">论坛导航</div>
<div class="mbbs_show" id="xheaderbbsNav">
<iframe scrolling="no" frameborder="0" style="width: 822px;" class="nav_daohang" id="daohang" name="daohang"
marginheight="0" marginwidth="0" border="0" target="_blank" height="552px"></iframe>
</div>
</div>
<!-- 论坛导航部分结束 -->
<div id="xheaderMessage" class="menubox fr"></div>
<!-- 车市导航部分开始 -->
<div class="mcs menubox fl" rel="xheaderchishi">
<div class="menutb" id="xHeaderIplocation"><a href="http://bj.xcar.com.cn/" target="_blank">北京车市</a></div>
<div class="mcs_show" id="xheadcsdaohang">
<iframe scrolling="no" frameborder="0" height="171px" style="width: 702px;" id="csdaohang" name="csdaohang"
marginheight="0" marginwidth="0" border="0" target="_blank"></iframe>
</div>
</div>
<!-- 车市导航部分结束 -->
<div id="xloginBtn" style="display:none;float:right;height:30px;"></div>
<div id="xlogininfo" class="muser menubox fr" style=""></div>
</div>
</div>
<!-- login end -->
<div class="Headnav_bg">
<div class="Headnav">
<div class="Hnav_choose">
<ul>
<li class="tit"><a href="http://newcar.xcar.com.cn/" onclick="clicklog('123948','','');">选车</a></li>
<li><a href="http://info.xcar.com.cn/" onclick="clicklog('123949','','');">新车</a></li>
<li><a href="http://info.xcar.com.cn/guide/" onclick="clicklog('123950','','');">导购</a>•<a
href="http://drive.xcar.com.cn/" onclick="clicklog('123951','','');">试驾</a></li>
<li><a href="http://newcar.xcar.com.cn/photo/" onclick="clicklog('123952','','');">车图</a></li>
<li><a href="http://suv.xcar.com.cn/" onclick="clicklog('123955','','');">SUV</a></li>
</ul>
</div>
<div class="Hnav_buy">
<ul>
<li class="tit"><a href="http://newcar.xcar.com.cn/buy/" onclick="clicklog('123956','','');">买车</a> </li>
<li><a href="http://price.xcar.com.cn/" onclick="clicklog('123957','','');">报价</a> </li>
<li><a href="http://dealer.xcar.com.cn/" onclick="clicklog('123958','','');">经销商</a> </li>
<li><a href="http://mall.xcar.com.cn/sale" onclick="clicklog('123959','','');">车有惠</a> </li>
<li><a href="http://used.xcar.com.cn/" onclick="clicklog('123960','','');">二手车</a> </li>
</ul>
</div>
<div class="Hnav_use cwy_Hnav_use">
<ul>
<li class="tit"><a href="http://yp.xcar.com.cn/" onclick="clicklog('123961','','');">用车</a></li>
<li><a href="http://mall.xcar.com.cn" onclick="clicklog('123963','','');">商城</a></li>
</ul>
</div>
<div class="Hnav_inte cwy_Hnav_inte">
<ul>
<li class="tit"><a href="http://club.xcar.com.cn/" onclick="clicklog('123964','','');">社区</a><i class="H_news"
style="display:none"></i></li>
<li><a href="//club.xcar.com.cn/diy/" target="_blank" onclick="clicklog('127784','','');"
style="position:relative;">游记</a></li>
<li><a href="http://my.xcar.com.cn/thread/hot.htm" target="_blank" onclick="clicklog('123965','','');">热帖</a>
</li>
<li><a href="http://club.xcar.com.cn/selected/" target="_blank" onclick="clicklog('123966','','');">精选</a> </li>
</ul>
</div>
<div class="Hnav_found">
<ul>
<li class="tit"><a href="http://culture.xcar.com.cn" onclick="clicklog('126518','','');">文化</a></li>
</ul>
</div>
</div>
</div>
<script src="//asserts.xcarimg.com/resource/common/jquery-1.8.3.min.js"></script><script src="//cstaticdun.126.net/load.min.js"></script><!--/顶部导航-->
<div id="div_newd0_js_1179" ></div>
<!-- 车型页内容 -->
<!--面包屑-->
<div class="place_nv">
<div class="place">当前位置:<a target="_blank" href="//www.xcar.com.cn">爱卡汽车</a>><a target="_blank" href="/car/0-0-0-0-0-0-8-0-0-0-0-0/">跑车</a>><a target="_blank" href="/3/">奥迪TT双门</a>><a target="_blank" href="/m35001/">2017款 45 TFSI</a>><span>车型首页</span></div>
<div class="seek">
<form name="searchForm" class="model_form_con clearfix" action="//search.xcar.com.cn/search.php" target="_blank" method="get">
<div class="seek_cn">
<span class="seek_ico"></span>
<input type="text" id="hsearchkey" name="k" autocomplete="off" class="input_txt">
<input type="hidden" name="c" value="1">
<input type="hidden" name="ie" value="gbk">
</div>
<a class="blue_but" href="javascript:void(0);" id="hesearchBtn">搜索</a>
<div id="searchResultlist" class="model_form_s" style="display: none;"><ul></ul></div>
</form>
<link rel="stylesheet" href="//icon.xcar.com.cn/ss/newsearch/css/search.css">
<script data-main="searchExec" src="//js.xcar.com.cn/tools/requirejs/2.3.js?v=1.20170120"></script>
<script>
var _tpl = 'source/search/search_tpl_c1.r';
var _linkid = '124987';
var _spserid = '102530';
var _associativeid = '124988';
var _sresultid = '125158';
var cacheSettings={
tpl:"1.20170323.1",
search:"1.20170323.1",
searchExec:"1.20170323.1"
};
requirejs.config({
baseUrl:"//js.xcar.com.cn/",
paths:{
"jquery": ["./tools/jq/1.9-nol"],
"tpl":[_tpl],
"search":["source/search/search.r"],
"searchExec":["source/search/search_exec.r"],
"emptyFn":["source/search/search_emptyfns.r"]
},
config:{
"tpl":{
"clickP":{
"spser":"#zoneclick="+ _spserid +"",
"associative":"#zoneclick="+ _associativeid +"",
"sresult":"#zoneclick="+ _sresultid +""
}
},
"searchExec":{
"linkid":_linkid
}
},
urlArgs:function(id, url) {
if(!cacheSettings[id])return "";
return (url.indexOf("?") === -1 ? "?" : "&") + "v="+cacheSettings[id];
}
});
</script>
</div>
</div>
<!--中间开始头部-->
<style type="text/css">
.tt_nav li {
width: 8.32%;
}
</style>
<!-- 通用导航 -->
<div class="model_wp">
<div class="model_main mt0">
<div class="new_wt">
<div class="tt_h1 no_bt">
<span class="return"><a href="/3/"><<返回奥迪(进口)-奥迪TT双门 频道</a>|</span>
<span class="lt_f1">2017款 </span><h1>45 TFSI</h1>
<div class="select focus_car">
<a href="javascript:;" class="select_on"></a><!-- 鼠标点击添加 select_off -->
<div class="select_lt focus_car_list" style="display: none;">
<span class="title">2017款奥迪TT双门</span>
<a href="/m37326/" title="2017款奥迪TT双门40 TFSI" >40 TFSI</a>
<a href="/m35001/" title="2017款奥迪TT双门45 TFSI" >45 TFSI</a>
<a href="/m35002/" title="2017款奥迪TT双门45 TFSI quattro" >45 TFSI quattro</a>
<span class="title">2017款奥迪TT敞篷</span>
<a href="/m35005/" title="2017款奥迪TT敞篷Roadster 45 TFSI" >Roadster 45 TFSI</a>
<a href="/m35006/" title="2017款奥迪TT敞篷Roadster 45 TFSI quattro" >Roadster 45 TFSI quattro</a>
</div>
</div>
</div>
<div class="state">
<a href="javascript:;" onclick="clicklog(124799);" dc="follow" class="orange_but follow ps_head_attention"><em></em>加关注</a>
</div>
</div>
<!-- 顶部标题 -->
<ul class="tt_nav">
<li><a href="/m35001/" onclick="clicklog(124656);" title="2017款 2.0T 45 TFSI车型首页" class="cur">车型首页</a></li>
<li><a href="/m35001/config.htm" onclick="clicklog(123612);" title="奥迪TT双门参数配置">参数配置</a></li>
<li><a href="/photo/m35001/" class="model_nav_photo" onclick="clicklog(123594);" title="奥迪TT双门图片" target="_blank">图片</a></li>
<li><a id="newcar_nav_dealer_price" href="/m35001/baojia/" onclick="clicklog(123597);" title="奥迪TT双门报价">报价</a></li>
<li><a href="javascript:void(0);" class="no"title="奥迪TT双门全车详解">全车详解</a></li>
<!-- <li><a rel="nofollow" href="/m35001/review.htm" onclick="clicklog(124658);" title="奥迪TT双门口碑" >口碑</a></li>-->
<li><a rel="nofollow" href="/m35001/review.htm" onclick="clicklog(124658);" title="奥迪TT双门口碑" >口碑</a></li>
<li><a rel="nofollow" href="/m35001/news.htm" onclick="clicklog(124659);" title="奥迪TT双门文章home" >文章</a></li>
<li><a rel="nofollow" href="/m35001/video.htm" onclick="clicklog(124660);" title="2017款 2.0T 45 TFSI视频">视频</a></li>
<li><a rel="nofollow" href="javascript:void(0);" class="no" title="2017款 2.0T 45 TFSI养车报告" >养车报告</a></li>
<li><a class="xcar_used_car"href="//used.xcar.com.cn/" onclick="clicklog(124662);" target="_blank" title="奥迪TT双门二手车" >二手车</a></li>
<li><a id="xcar_loan_car" class="no" href="javascript:;" onclick="clicklog(127107);" title="奥迪TT双门贷款" >贷款</a></li>
<li><a href="//www.xcar.com.cn/bbs/forumdisplay.php?fid=703" onclick="clicklog(123596);" target="_blank" title="奥迪TT双门论坛">论坛</a></li>
</ul>
</div>
<!-- 顶部标题 end-->
</div>
<script type="text/javascript">
var _pserid = '3';
var _nav_mid = '35001';
var type = 'm';
if( typeof getDealerPriceNav == 'function' )
getDealerPriceNav(_pserid,_nav_mid,city_id);
if(_nav_mid > 0 )
{
if( typeof nav_attention == 'function' )
nav_attention();
}
if( typeof checkUsedCar == 'function' )
checkUsedCar(3,city_id,province_id,1,type)
//点击空白处 关闭
$(document).click(function(e){
//基本信息车型下拉菜单部分
if(e.target.parentNode.className != "focus_car_list")
{
$('.focus_car').find('.select_off').removeClass().addClass('select_on');
$('.focus_car').children('.focus_car_list').hide();
}
})
$('.focus_car').children('a').click(function(ev){
if(this.className === 'select_on') {
this.className = 'select_on select_off';
$(this.parentNode).children('.focus_car_list').show();
}else{
this.className = 'select_on';
$(this.parentNode).children('.focus_car_list').hide();
}
ev.preventDefault();
return false;
});
</script>
<!-- 通用导航END -->
<!-- 头部框架 end-->
<!-- 当前位置&搜索 end-->
<!-- 内容框架 -->
<div class="model_wp">
<!-- 顶部标题 -->
<!-- 顶部标题 end-->
</div>
<div class="model_wp">
<!-- 栏目框架 -->
<div class="model_cl">
<!-- 焦点图 -->
<div class="model_main">
<div class="focus_cn">
<div class="focus_big" >
<a class="imga_new model_first_img " target="_blank" href="/photo/m35001/" onclick="clicklog(123711);" thref="/photo/m35001/" data-href="/photo/s8386_1/3346975.htm">
<img class="color_car_img_new" src="//img1.xcarimg.com/b63/s8386/m_20170616000036181753843373443.jpg-280x210.jpg" width="280" height="210" alt="2017款奥迪TT双门 " title="2017款奥迪TT双门 " onerror="this.src='//icon.xcar.com.cn/2011newcar/images/auto/car_default.jpg'" defaultimg="//img1.xcarimg.com/b63/s8386/m_20170616000036181753843373443.jpg-280x210.jpg">
<p class="pr_bg"><a target="_blank" href="/photo/m35001/" >查看117张实拍图片 <i>>></i></a></p>
<input type="hidden" id="hid_picurl" value="/photo/m35001/" />
</a>
</div>
<div class="hue" style="">
<label>车身颜色:</label>
<a class='car_select_color_new' href="#" title="探戈红" rel="" style="cursor: default;" ><div class="bd"><div class="bd_c" style="background-color:#c5131f;"></div></div></a>
<a class='car_select_color_new' href="#" title="冰川白" rel="" style="cursor: default;" ><div class="bd"><div class="bd_c" style="background-color:#f6f6f6;"></div></div></a>
<a class='car_select_color_new' href="#" title="天云灰" rel="" style="cursor: default;" ><div class="bd"><div class="bd_c" style="background-color:#6e6e70;"></div></div></a>
<a class='car_select_color_new' href="#" title="季风灰" rel="" style="cursor: default;" ><div class="bd"><div class="bd_c" style="background-color:#525657;"></div></div></a>
<a class='car_select_color_new' href="#" title="斯库巴蓝" rel="" style="cursor: default;" ><div class="bd"><div class="bd_c" style="background-color:#484677;"></div></div></a>
<a class='car_select_color_new' href="#" title="花剑银" rel="" style="cursor: default;" ><div class="bd"><div class="bd_c" style="background-color:#c1c5c8;"></div></div></a>
<a class='car_select_color_new' href="#" title="纳诺灰" rel="" style="cursor: default;" ><div class="bd"><div class="bd_c" style="background-color:#8e8e90;"></div></div></a>
<a class='car_select_color_new' href="#" title="维加斯黄" rel="" style="cursor: default;" ><div class="bd"><div class="bd_c" style="background-color:#fcc84c;"></div></div></a>
<div class="hue_more">
<a href="javascript:;" class="hue_on">更多<em></em></a><!--鼠标点击展开样式 .hue_off-->
<div class="hue_main" style="width:42px;display: none;">
<a class='car_select_color_new' href="#" title="传奇黑" rel="" style="cursor: default;" ><div class="bd"><div class="bd_c" style="background-color:#000000;"></div></div></a>
</div>
</div>
</div>
</div>
<div class="ref_cn">
<div class="ref_pc">
<dl class="ref_dl1">
<dt> 本地<br/>参考价 </dt>
<dd class="ref_ico1"></dd><!--
<dd><span class="htc_saga">即将上市</span></dd>-->
<dd id="low_price_new"></dd>
</dl>
<dl class="ref_dl2" style="border-right-width: 0px;" >
<dt>厂商<br/>指导价 </dt>
<dd class="ref_ico2"></dd>
<!-- 停售不给链接-->
<dd>
<em class="grey">
<a href="/jisuanqi/quankuan/m35001/" target="_blank" class="drop"></a>
<a href="/m35001/baojia/" target="_blank" onclick="clicklog(124663);">47.18</a>
</em>万
</dd>
</dl>
<dl class="ref_dl3" id="youhui" style="display: none;">
<dt>至少<br/>优惠</dt>
<dd class="ref_ico3" style="display:none;"></dd>
<dd><em><a id='preferential' href='' target="_blank" onclick="clicklog(124664);"></a></em>万<a class="inform" href="javascript:;" style="display: none;">降价通知</a> </dd>
</dl>
</div>
<div class="ref_lk">
<a href="http://newcar.xcar.com.cn/auto/index.php?r=dealerPopw/order&type=1&mid=35001&is_cms=757&cid=2" target="_blank" class="orange_but alink" onclick="clicklog(123757)">询底价</a>
<a href="http://newcar.xcar.com.cn/auto/index.php?r=dealerPopw/order&mid=35001&did=0&type=1&is_cms=759&cid=2&exchange=1" target="_blank" class="grey_but alink" onclick="clicklog(124665);">置换</a>
<div id='loancar'></div>
<div id="used2_cars"></div>
</div>
<ul class="ref_ul">
<li><span>车身尺寸:</span><em>4191×1832×1353mm</em></li>
<li class="bd_l"><span>工信部油耗:</span><em>16.7L/100km</em></li>
<li><span>变 速 箱:</span><em>6挡双离合</em></li>
<li class="bd_l"><span>发 动 机:</span><em>169kW(2.0L涡轮增压)</em></li>
<li><span>驱动方式:</span><em>前置前驱</em></li>
<li class="bd_l"><span>排 量:</span><em>2.0L</em></li>
</ul>
</div>
</div>
<!-- 焦点图 end-->
<div id="div_newd0_js_2044" ></div>
<!-- 参数配置 -->
<div class="model_main">
<div class="model_tt">
<h2><a href="/m35001/config.htm" target="_blank" title="2017款 45 TFSI参数配置" onclick="clicklog(124666);">2017款 45 TFSI 参数配置</a></h2><span class="more mt15"><em></em><a href="/m35001/config.htm" target="_blank" onclick="clicklog(124666);">更多</a></span></div>
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="deploy_tb">
<tbody>
<tr class="deploy_hd">
<td colspan="4"><span>基本参数</span><div class="marking"><label>解释:</label><span>-无</span><span>● 有</span><span>○ 可选</span><span>▲ 待查</span></div></td>
</tr>
<tr>
<td class="w148 bdl">级别</td>
<td class="w237">跑车</td>
<td class="w148 ">发动机</td>
<td class="w237">169kW(2.0L涡轮增压)</td>
</tr><tr> <td class="w148 bdl">动力类型</td>
<td class="w237">汽油机</td>
<td class="w148 ">变速箱</td>
<td class="w237">6挡双离合</td>
</tr><tr> <td class="w148 bdl">长×宽×高(mm)</td>
<td class="w237">4191×1832×1353</td>
<td class="w148 ">车身结构</td>
<td class="w237">2门 4座 跑车</td>
</tr><tr> <td class="w148 bdl">上市年份</td>
<td class="w237">2017</td>
<td class="w148 ">最高车速(km/h)</td>
<td class="w237">250</td>
</tr><tr> <td class="w148 bdl">0-100加速时间(s)</td>
<td class="w237">5.9</td>
<td class="w148 ">工信部油耗(L/100km)</td>
<td class="w237">6.7</td>
<!-- <td class="w148"></td>
<td class="w237"></td>
--> </tr>
</tbody>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="deploy_tb">
<tbody>
<tr class="deploy_cn">
<td colspan="4"><span>车身参数</span></td>
</tr>
<tr>
<td class="w148 bdl">车长(mm)</td>
<td class="w237">4191</td>
<td class="w148">车宽(mm)</td>
<td class="w237">1832</td>
</tr>
<tr>
<td class="w148 bdl">车高(mm)</td>
<td class="w237">1353</td>
<td class="w148">轴距(mm)</td>
<td class="w237">2502</td>
</tr>
<tr>
<td class="w148 bdl">整备质量(kg)</td>
<td class="w237">1350</td>
<td class="w148">最小离地间隙(mm)</td>
<td class="w237">-</td>
</tr>
<tr>
<td class="w148 bdl">前轮距(mm)</td>
<td class="w237">1572</td>
<td class="w148">后轮距(mm)</td>
<td class="w237">1552</td>
</tr>
<tr>
<td class="w148 bdl">车门数</td>
<td class="w237">2</td>
<td class="w148">座位数</td>
<td class="w237">4</td>
</tr>
<tr>
<td class="w148 bdl">油箱容积(L)</td>
<td class="w237">50</td>
<td class="w148">行李厢最小容积(L)</td>
<td class="w237">305</td>
</tr>
</tbody>
</table>
<p class="look_all"><a href="/m35001/config.htm" target="_blank">查看全部配置</a></p>
</div> <!-- 参数配置 end -->
<div id="div_newd0_js_2239" ></div>
<!-- 图片 -->
<div class="model_main">
<div class="model_tt"><h2><a href="/photo/m35001" target="_blank">2017款 45 TFSI 实拍图片</a> </h2><span class="digit">共有<em>117</em>张图片</span></div>
<div class="img_cn">
<div class="img_tt"><h3>整体外观</h3><span class="fl">(8张)</span> <span class="more"><em></em><a href="/photo/m35001_1/" target="_blank" onclick="clicklog(124675)">更多</a></span> </div>
<ul class="img_lt">
<li><a href="/photo/s8386_1/3346972.htm" target="_blank" class="a_img" onclick="clicklog(124676)"><img src="//img1.xcarimg.com/b63/s8386/20170616000025123831063331037.jpg-200x150.jpg" width="140" height="105"></a><p><a target="_blank" href="/photo/s8386_1/3346972.htm">纯正</a></p></li>
<li><a href="/photo/s8386_1/3346975.htm" target="_blank" class="a_img" onclick="clicklog(124676)"><img src="//img1.xcarimg.com/b63/s8386/20170616000036181753843373443.jpg-200x150.jpg" width="140" height="105"></a><p><a target="_blank" href="/photo/s8386_1/3346975.htm">正侧45度</a></p></li>
<li><a href="/photo/s8386_1/3346976.htm" target="_blank" class="a_img" onclick="clicklog(124676)"><img src="//img1.xcarimg.com/b63/s8386/20170616000039922540650670090.jpg-200x150.jpg" width="140" height="105"></a><p><a target="_blank" href="/photo/s8386_1/3346976.htm">纯侧</a></p></li>
<li><a href="/photo/s8386_1/3346978.htm" target="_blank" class="a_img" onclick="clicklog(124676)"><img src="//img1.xcarimg.com/b63/s8386/20170616000051097035004394028.jpg-200x150.jpg" width="140" height="105"></a><p><a target="_blank" href="/photo/s8386_1/3346978.htm">后侧45度</a></p></li>
<li><a href="/photo/s8386_1/3346977.htm" target="_blank" class="a_img" onclick="clicklog(124676)"><img src="//img1.xcarimg.com/b63/s8386/20170616000045311923611160840.jpg-200x150.jpg" width="140" height="105"></a><p><a target="_blank" href="/photo/s8386_1/3346977.htm">纯后</a></p></li>
</ul>
<div class="img_tt"><h3>细节外观</h3><span class="fl">(36张)</span> <span class="more"><em></em><a href="/photo/m35001_2/" target="_blank" onclick="clicklog(124677)">更多</a></span> </div>
<ul class="img_lt">
<li><a href="/photo/s8386_2/3346981.htm" target="_blank" class="a_img" onclick="clicklog(124678)"><img src="//img1.xcarimg.com/b63/s8386/20170616000104902046708017325.jpg-200x150.jpg" width="140" height="105"></a><p><a target="_blank" href="/photo/s8386_2/3346981.htm">头灯</a></p></li>
<li><a href="/photo/s8386_2/3347003.htm" target="_blank" class="a_img" onclick="clicklog(124678)"><img src="//img1.xcarimg.com/b63/s8386/20170616000213603002179043972.jpg-200x150.jpg" width="140" height="105"></a><p><a target="_blank" href="/photo/s8386_2/3347003.htm">尾灯</a></p></li>
<li><a href="/photo/s8386_2/3346982.htm" target="_blank" class="a_img" onclick="clicklog(124678)"><img src="//img1.xcarimg.com/b63/s8386/20170616000107402562084812610.jpg-200x150.jpg" width="140" height="105"></a><p><a target="_blank" href="/photo/s8386_2/3346982.htm">雾灯</a></p></li>
<li><a href="/photo/s8386_2/3346980.htm" target="_blank" class="a_img" onclick="clicklog(124678)"><img src="//img1.xcarimg.com/b63/s8386/20170616000102863805237406700.jpg-200x150.jpg" width="140" height="105"></a><p><a target="_blank" href="/photo/s8386_2/3346980.htm">中网</a></p></li>
<li><a href="/photo/s8386_2/3346984.htm" target="_blank" class="a_img" onclick="clicklog(124678)"><img src="//img1.xcarimg.com/b63/s8386/20170616000116342047355906779.jpg-200x150.jpg" width="140" height="105"></a><p><a target="_blank" href="/photo/s8386_2/3346984.htm">后视镜</a></p></li>
</ul>
<div class="img_tt"><h3>空间座椅</h3><span class="fl">(39张)</span> <span class="more"><em></em><a href="/photo/m35001_3/" target="_blank" onclick="clicklog(124679)">更多</a></span> </div>
<ul class="img_lt">
<li><a href="/photo/s8386_3/3347017.htm" target="_blank" class="a_img" onclick="clicklog(124680)"><img src="//img1.xcarimg.com/b63/s8386/20170616000300537135121486050.jpg-200x150.jpg" width="140" height="105"></a><p><a target="_blank" href="/photo/s8386_3/3347017.htm">前排空间</a></p></li>
<li><a href="/photo/s8386_3/3347045.htm" target="_blank" class="a_img" onclick="clicklog(124680)"><img src="//img1.xcarimg.com/b63/s8386/20170616000425404955758911420.jpg-200x150.jpg" width="140" height="105"></a><p><a target="_blank" href="/photo/s8386_3/3347045.htm">前排座椅</a></p></li>
<li><a href="/photo/s8386_3/3347046.htm" target="_blank" class="a_img" onclick="clicklog(124680)"><img src="//img1.xcarimg.com/b63/s8386/20170616000427049960467197466.jpg-200x150.jpg" width="140" height="105"></a><p><a target="_blank" href="/photo/s8386_3/3347046.htm">后排座椅</a></p></li>
<li><a href="/photo/s8386_3/3347018.htm" target="_blank" class="a_img" onclick="clicklog(124680)"><img src="//img1.xcarimg.com/b63/s8386/20170616000303772957640514081.jpg-200x150.jpg" width="140" height="105"></a><p><a target="_blank" href="/photo/s8386_3/3347018.htm">座椅调节</a></p></li>
<li><a href="/photo/s8386_3/3347047.htm" target="_blank" class="a_img" onclick="clicklog(124680)"><img src="//img1.xcarimg.com/b63/s8386/20170616000430441074945897388.jpg-200x150.jpg" width="140" height="105"></a><p><a target="_blank" href="/photo/s8386_3/3347047.htm">后排座椅放倒</a></p></li>
</ul>
<div class="img_tt"><h3>中控区</h3><span class="fl">(23张)</span> <span class="more"><em></em><a href="/photo/m35001_4/" target="_blank" onclick="clicklog(124681)">更多</a></span> </div>
<ul class="img_lt">
<li><a href="/photo/s8386_4/3347062.htm" target="_blank" class="a_img" onclick="clicklog(124682)"><img src="//img1.xcarimg.com/b63/s8386/20170616000526513982539792003.jpg-200x150.jpg" width="140" height="105"></a><p><a target="_blank" href="/photo/s8386_4/3347062.htm">全景内饰</a></p></li>
<li><a href="/photo/s8386_4/3347063.htm" target="_blank" class="a_img" onclick="clicklog(124682)"><img src="//img1.xcarimg.com/b63/s8386/20170616000528483661578176390.jpg-200x150.jpg" width="140" height="105"></a><p><a target="_blank" href="/photo/s8386_4/3347063.htm">中控台</a></p></li>
<li><a href="/photo/s8386_4/3347066.htm" target="_blank" class="a_img" onclick="clicklog(124682)"><img src="//img1.xcarimg.com/b63/s8386/20170616000537816545661674645.jpg-200x150.jpg" width="140" height="105"></a><p><a target="_blank" href="/photo/s8386_4/3347066.htm">方向盘</a></p></li>
<li><a href="/photo/s8386_4/3347073.htm" target="_blank" class="a_img" onclick="clicklog(124682)"><img src="//img1.xcarimg.com/b63/s8386/20170616000557771404412010338.jpg-200x150.jpg" width="140" height="105"></a><p><a target="_blank" href="/photo/s8386_4/3347073.htm">仪表</a></p></li>
<li><a href="/photo/s8386_4/3347058.htm" target="_blank" class="a_img" onclick="clicklog(124682)"><img src="//img1.xcarimg.com/b63/s8386/20170616000513292197626799008.jpg-200x150.jpg" width="140" height="105"></a><p><a target="_blank" href="/photo/s8386_4/3347058.htm">变速挡杆</a></p></li>
</ul>
<div class="img_tt"><h3>其它</h3><span class="fl">(11张)</span> <span class="more"><em></em><a href="/photo/m35001_5/" target="_blank" onclick="clicklog(124683)">更多</a></span> </div>
<ul class="img_lt">
<li><a href="/photo/s8386_5/3347080.htm" target="_blank" class="a_img" onclick="clicklog(124684)"><img src="//img1.xcarimg.com/b63/s8386/20170616000625022261633953642.jpg-200x150.jpg" width="140" height="105"></a><p><a target="_blank" href="/photo/s8386_5/3347080.htm">发动机</a></p></li>
<li><a href="/photo/s8386_5/3347088.htm" target="_blank" class="a_img" onclick="clicklog(124684)"><img src="//img1.xcarimg.com/b63/s8386/20170616000650026850291967034.jpg-200x150.jpg" width="140" height="105"></a><p><a target="_blank" href="/photo/s8386_5/3347088.htm">钥匙</a></p></li>
<li><a href="/photo/s8386_5/3347078.htm" target="_blank" class="a_img" onclick="clicklog(124684)"><img src="//img1.xcarimg.com/b63/s8386/20170616000619170932612834877.jpg-200x150.jpg" width="140" height="105"></a><p><a target="_blank" href="/photo/s8386_5/3347078.htm">备胎</a></p></li>
<li><a href="/photo/s8386_5/3347087.htm" target="_blank" class="a_img" onclick="clicklog(124684)"><img src="//img1.xcarimg.com/b63/s8386/20170616000647225930219350653.jpg-200x150.jpg" width="140" height="105"></a><p><a target="_blank" href="/photo/s8386_5/3347087.htm">其它</a></p></li>
<li><a href="/photo/s8386_5/3347086.htm" target="_blank" class="a_img" onclick="clicklog(124684)"><img src="//img1.xcarimg.com/b63/s8386/20170616000644881955392057937.jpg-200x150.jpg" width="140" height="105"></a><p><a target="_blank" href="/photo/s8386_5/3347086.htm">其它</a></p></li>
</ul>
</div>
</div>
<!-- 图片 end-->
<!-- short_video start -->
<!-- short_video end -->
<!-- 经销商报价 -->
<div class="model_main">
<div class="model_tt bd_b local2_name">
<h2><a href="" target="_blank" id="local_url">本地经销商报价</a></h2>
<div class="city_site">
<div class="seller_tab">
<a href="javascript:;" class="site_on site_switch_box "><em></em>切换城市</a><!--鼠标点击激活.site_off-->
<div class="site_pop seller_level" style="display:none;">
<div class="site_h2"></div>
<div class="selectbox city_select">
<div class="selecttxt"><div class="selectem provinceName">选择省份</div></div>
<div class="option" style="display: none; " >
<ul class="province"></ul>
</div>
<input type="hidden" name="province_id" class="province_id" value="0" />
</div>
<div class="selectbox city_select procity" >
<div class="selecttxt"><div class="selectem cityName" >选择城市</div></div>
<div class="option" style="display: none; ">
<ul class="city"></ul>
</div>
<input type="hidden" name="city_id" class="city_id" value="0" />
</div>
<a href="javascript:;" class="blue_but pub_city_but" >确定</a>
</div>
</div>
<script type="text/javascript">
$(document).ready(function() {
/* 下拉插件JS */
$("div.seller_tab .selectbox").hover(function() {
$(this).addClass("selectbox_hover");
},
function() {
$(this).removeClass("selectbox_hover");
});
$("div.seller_tab .option li").hover(function() {
$(this).addClass("active");
},
function() {
$(this).removeClass("active");
});
$("div.seller_tab .selecttxt").unbind();
$("div.seller_tab .selecttxt").click(function(event) {
//停止冒泡
event.stopPropagation();
/* 定义下拉内容最大高度 */
if($(this).siblings(".option").height()>=300)
{
$(this).siblings(".option").height(300);
}
else
{
$(this).siblings(".option").height('auto');
}
//判断当前状态如果打开则关闭
if($(this).parent().is('.selectbox_on'))
{
$(this).parent().find(".option").hide();
$(this).parent().removeClass("selectbox_on"); return;
}
//普通点击事件
$("div.seller_tab .selectbox").removeClass("selectbox_on");
$(this).parent().addClass("selectbox_on");
$("div.seller_tab .selectbox").find('.option').hide();
$(this).parent().find(".option").show();
});
/* 下拉插件JS end */
$("div.seller_tab a.site_switch_box").unbind();
//城市下拉
$('div.seller_tab a.site_switch_box').click(function(event){
event.stopPropagation(); //停止冒泡
$('div.seller_tab a.site_switch_box').removeClass('site_off');
var _parent_obj = $(this).parent('.seller_tab');
var _pop_obj = _parent_obj.find('.seller_level');
if(_pop_obj.is(':hidden')){
$(this).addClass('site_off');
$('div.seller_tab').find('div.site_pop').hide();
_pop_obj.show();
}else{
$('div.seller_tab').find('div.site_pop').hide();
}
});
});
var _city_id = '507';
var _province_id = '2';
sel_province(_province_id, _city_id)
//省份下拉框
function sel_province(_province_id,_city_id)
{
var pro_arr = province_arr.split(",");
var str = '';
var arrpro = ['1','2','3','4'];
for(var i=0;i<pro_arr.length;i++)
{
if(i%2==0)
{
if($.inArray(pro_arr[i], arrpro) > -1){
str +='<li value="'+pro_arr[i]+'" onclick="get_cityid('+pro_arr[i]+')" name="pro_'+pro_arr[i]+'" class=""><a href="javascript:void(0)">'+pro_arr[i+1]+'</a></li>';
}
else{
str +='<li value="'+pro_arr[i]+'" onclick="get_cityid('+pro_arr[i]+')" name="pro_'+pro_arr[i]+'" class=""><a href="javascript:void(0)">'+pro_arr[i+1]+'</a></li>';
}
//默认展示城市
if( _province_id > 0 && pro_arr[i] == _province_id)
{
$('div.seller_tab').find('div.provinceName').text(pro_arr[i+1]).find("input[class='province_id']").val(pro_arr[i]);
}
}
if(i>200){$(".seller_tab .province").css('height',100);}
}
$(".seller_tab .province").html(str);
sel_option();
if( _province_id > 0)
{
get_cityid(_province_id,_city_id);
}
}
//城市下拉框
function get_cityid(id,_city_id){
var _city_id = typeof _city_id != "undefined" ? _city_id : 0;
if(id=="") return false;
if(id == 1){
$(".seller_tab .cityName").text('北京市');
$(".seller_tab .city_id").attr('value',475);
}
else if( id == 2){
$(".seller_tab .cityName").text('上海市');
$(".seller_tab .city_id").attr('value',507);
}
else if(id == 3){
$(".seller_tab .cityName").text('天津市');
$(".seller_tab .city_id").attr('value',484);
}
else if(id == 4){
$(".seller_tab .cityName").text('重庆市');
$(".seller_tab .city_id").attr('value',539);
}
else{
$(".seller_tab .cityName").text('选择城市');
$(".seller_tab .city_id").attr('value',0);
}
var cityid_arr = city_arr[id].split(",");
var str = '';
for(var i=0;i<cityid_arr.length;i++)
{
if(i%2==0)
{
str +='<li class="" name="city_'+cityid_arr[i]+'"><a href="javascript:void(0)">'+cityid_arr[i+1]+'</a></li>';
if( _city_id > 0 && cityid_arr[i] == _city_id)
{
$('div.seller_tab div.city_select').find('div.cityName').text(cityid_arr[i+1])
$('div.seller_tab div.city_select').find("input[class='city_id']").val(_city_id);
}
}
}
$(".seller_tab .cityName").text(cityid_arr[1]);//加个默认选中第一个城市功能
$(".seller_tab .city_id").attr('value',cityid_arr[0]);
$(".seller_tab .city").html(str);
sel_option();
}
//城市下拉切换
function sel_option()
{
$(".seller_tab .option li").not(".onblur").click(function(event){
event.stopPropagation(); //停止冒泡
var text=$(this).children("a").text();
var name = $(this).attr('name').replace(/[^\d]/g,'');
$(this).parents(".option").siblings(".selecttxt").children('.selectem').text(text);
$(this).parents(".option").siblings("input").attr('value',name);
$('.option').hide();
$(".selectbox").removeClass("selectbox_on");
});
}
/* 点击页面其他地方,清除当前下拉框状态 */
$(document).click(function(event){
var eo=$(event.target);
if($(".seller_tab .seller_level").is(":visible") && eo.attr("class")!="option" && !eo.parent(".option").length){
$('.seller_tab .seller_level').hide();
$('.seller_tab .option').hide();
$("div.seller_tab .selectbox").removeClass("selectbox_on");
$('.seller_tab .site_on').removeClass('site_off');
}
});
</script>
</div>
<ul class="tag_ul fr deal_bk">
<li><a href="javascript:;" class="cur">4S经销商</a>|</li>
<li><a href="javascript:;">综合经销商</a></li>
</ul>
</div>
<div id="sync_dealer_list" style=""><!--异步框-->
</div><!--异步框-->
<p class="sell_hint">爱卡汽车提醒您:过低的报价在实际交易中可能存在附加条件</p>
</div>
<!-- 经销商报价 end-->
<!-- 竞品车型对比 -->
<div class="model_main">
<div class="model_tt"><h2>竞品车型对比</h2><a onclick="clicklog(124804);" href="javascript:;" id="whole_compares" class="blue_but all" style="">全部加入对比</a></div>
<ul class="contrast_ul">
<li>
<a href="/m45776/" target="_blank" class="a_img">
<img src="//img1.xcarimg.com/b98/s10478/20190404155047471920547506291.jpg" width="180" height="135" alt="2019款Mustang 2.3L EcoBoost"/>
<p class="guide">指导价:<span><em>36.98</em>万</span></p>
</a>
<div class="contrast_txt">
<p class="contrast_tt"><a href="/m45776/" target="_blank">2019款Mustang 2.3L EcoBoost</a></p>
<p>前置后驱 10挡自动</p>
<p><a href="javascript:;" class="grey_but" style="display: none;" data-value="45776|2019款Mustang 2.3L EcoBoost">已加入</a> <a onclick="clicklog(124805);" href='javascript:;' class="blue_but cmp_button" data-value="45776|2019款Mustang 2.3L EcoBoost">对比</a></p>
</div>
</li>
<li>
<a href="/m32946/" target="_blank" class="a_img">
<img src="//img1.xcarimg.com/b94/s8533/20170320162026594113417967240.jpg" width="180" height="135" alt="2017款科迈罗 RS"/>
<p class="guide">指导价:<span><em>39.99</em>万</span></p>
</a>
<div class="contrast_txt">
<p class="contrast_tt"><a href="/m32946/" target="_blank">2017款科迈罗 RS</a></p>
<p>前置后驱 8挡自动</p>
<p><a href="javascript:;" class="grey_but" style="display: none;" data-value="32946|2017款科迈罗 RS">已加入</a> <a onclick="clicklog(124805);" href='javascript:;' class="blue_but cmp_button" data-value="32946|2017款科迈罗 RS">对比</a></p>
</div>
</li>
<li>
<a href="/m46801/" target="_blank" class="a_img">
<img src="//img1.xcarimg.com/b59/s11747/20191017174920294764711411264.jpg" width="180" height="135" alt="2019款宝马Z4 sDrive 25i M运动套装版"/>
<p class="guide">指导价:<span><em>48.88</em>万</span></p>
</a>
<div class="contrast_txt">
<p class="contrast_tt"><a href="/m46801/" target="_blank">2019款宝马Z4 sDrive 25i M运动套装版</a></p>
<p>前置后驱 8挡自动</p>
<p><a href="javascript:;" class="grey_but" style="display: none;" data-value="46801|2019款宝马Z4 sDrive 25i M运动套装版">已加入</a> <a onclick="clicklog(124805);" href='javascript:;' class="blue_but cmp_button" data-value="46801|2019款宝马Z4 sDrive 25i M运动套装版">对比</a></p>
</div>
</li>
<li>
<a href="/m41989/" target="_blank" class="a_img">
<img src="//img1.xcarimg.com/b108/s10675/20180907095422000902699002366.jpg" width="180" height="135" alt="2019款雷克萨斯RC 300 锋尚版"/>
<p class="guide">指导价:<span><em>44.60</em>万</span></p>
</a>
<div class="contrast_txt">
<p class="contrast_tt"><a href="/m41989/" target="_blank">2019款雷克萨斯RC 300 锋尚版</a></p>
<p>前置后驱 8挡自动</p>
<p><a href="javascript:;" class="grey_but" style="display: none;" data-value="41989|2019款雷克萨斯RC 300 锋尚版">已加入</a> <a onclick="clicklog(124805);" href='javascript:;' class="blue_but cmp_button" data-value="41989|2019款雷克萨斯RC 300 锋尚版">对比</a></p>
</div>
</li>
</ul>
</div>
<!-- 竞品车型对比 end-->
<!-- 文章&热帖 -->
<div class="model_main">
<div class="new_txt fl">
<div class="model_tt"><h2> <a onclick="clicklog(124806);" href="/m35001/news.htm" target="_blank">奥迪TT双门最新文章</a> </h2><span class="more"><em></em><a href="/m35001/news.htm" target="_blank" onclick="clicklog(124687)">更多</a> </span></div>
<ul class="news_lt ht280">
<li><i><a href="/3/news_2.htm" target="_blank" onclick="clicklog(124688)">资讯</a>|</i><a href="//info.xcar.com.cn/201905/news_2039237_1.html" target="_blank" onclick="clicklog(124689)">奥迪TT量子灰特别版官图 欧洲限量99台</a><em>05月29日</em></li>
<li><i><a href="/3/news_2.htm" target="_blank" onclick="clicklog(124688)">资讯</a>|</i><a href="//info.xcar.com.cn/201807/news_2015717_1.html" target="_blank" onclick="clicklog(124689)">新款奥迪TT官图发布 外观调整更加运动</a><em>07月19日</em></li>
<li><i><a href="/3/news_2.htm" target="_blank" onclick="clicklog(124688)">资讯</a>|</i><a href="//info.xcar.com.cn/201803/news_2001835_1.html" target="_blank" onclick="clicklog(124689)">2019款奥迪TT谍照曝光 换装2.0T发动机</a><em>03月15日</em></li>
<li><i><a href="/3/news_2.htm" target="_blank" onclick="clicklog(124688)">资讯</a>|</i><a href="//info.xcar.com.cn/201709/news_1987461_1.html" target="_blank" onclick="clicklog(124689)">奥迪TT Coupe 40 TFSI车型上市 49.98万</a><em>09月28日</em></li>
<li><i><a href="/3/news_2.htm" target="_blank" onclick="clicklog(124688)">资讯</a>|</i><a href="//info.xcar.com.cn/201609/news_1952351_1.html" target="_blank" onclick="clicklog(124689)">奥迪TT clubsport turbo概念车国内首发</a><em>09月12日</em></li>
<li><i><a href="/3/news_3.htm" target="_blank" onclick="clicklog(124688)">导购</a>|</i><a href="//newcar.xcar.com.cn/201602/news_1910083_1.html" target="_blank" onclick="clicklog(124689)">红火过新年 8款不同级别的红色车型推荐</a><em>02月12日</em></li>
<li><i><a href="/3/news_2.htm" target="_blank" onclick="clicklog(124688)">资讯</a>|</i><a href="//info.xcar.com.cn/201601/news_1901492_1.html" target="_blank" onclick="clicklog(124689)">奥迪TT RS 4月发布 高性能版2017年亮相</a><em>01月06日</em></li>
<li><i><a href="/3/news_2.htm" target="_blank" onclick="clicklog(124688)">资讯</a>|</i><a href="//info.xcar.com.cn/201511/news_1883105_1.html" target="_blank" onclick="clicklog(124689)">奥迪TT RS假想图 将于日内瓦车展发布</a><em>11月17日</em></li>
<li><i><a href="/3/news_5.htm" target="_blank" onclick="clicklog(124688)">试驾</a>|</i><a href="//drive.xcar.com.cn/201510/news_1873504_1.html" target="_blank" onclick="clicklog(124689)">经典的传承 深度试驾全新奥迪TT 45TFSI</a><em>10月26日</em></li>
<li><i><a href="/3/news_2.htm" target="_blank" onclick="clicklog(124688)">资讯</a>|</i><a href="//info.xcar.com.cn/201510/news_1870338_1.html" target="_blank" onclick="clicklog(124689)">奔驰新CLA/宝马全新X3等曝光 周末谍报</a><em>10月18日</em></li>
</ul>
</div>
<div class="new_txt fr">
<div class="model_tt"><h2> <a onclick="clicklog(124807);" href="//www.xcar.com.cn/bbs/f703digestp1.html" target="_blank"> 奥迪TT双门论坛热帖</a> </h2><span class="more"><em></em><a onclick="clicklog(124808);" href="//www.xcar.com.cn/bbs/f703digestp1.html" target="_blank">进入论坛</a> </span></div>
<ul class="news_lt ht280">
<li><i><a href="//www.xcar.com.cn/bbs/f703op1.html;" target="_blank" onclick="clicklog(124690)" ></a>|</i><a href="//www.xcar.com.cn/bbs/viewthread.php?tid=93519443" target="_blank" onclick="clicklog(124691)">【女神请上车】绿野仙踪里寻觅奥迪</a><em>10月25日</em></li>
<li><i><a href="//www.xcar.com.cn/bbs/f703op1.html;" target="_blank" onclick="clicklog(124690)" ></a>|</i><a href="//www.xcar.com.cn/bbs/viewthread.php?tid=90590247" target="_blank" onclick="clicklog(124691)">北京奥迪TT汽车低速异响,挂挡冲击</a><em>06月08日</em></li>
<li><i><a href="//www.xcar.com.cn/bbs/f703op1.html;" target="_blank" onclick="clicklog(124690)" ></a>|</i><a href="//www.xcar.com.cn/bbs/viewthread.php?tid=81339461" target="_blank" onclick="clicklog(124691)">15年到17年之间生产的TT免费召回安</a><em>03月31日</em></li>
<li><i><a href="//www.xcar.com.cn/bbs/f703op1.html;" target="_blank" onclick="clicklog(124690)" ></a>|</i><a href="//www.xcar.com.cn/bbs/viewthread.php?tid=80254540" target="_blank" onclick="clicklog(124691)">TT已经开了这么久了,发个作业吧</a><em>11月23日</em></li>
<li><i><a href="//www.xcar.com.cn/bbs/f703op1.html;" target="_blank" onclick="clicklog(124690)" ></a>|</i><a href="//www.xcar.com.cn/bbs/viewthread.php?tid=33668400" target="_blank" onclick="clicklog(124691)">【换上普利司通大脚】TT换鞋经历</a><em>06月13日</em></li>
<li><i><a href="//www.xcar.com.cn/bbs/f703op1.html;" target="_blank" onclick="clicklog(124690)" ></a>|</i><a href="//www.xcar.com.cn/bbs/viewthread.php?tid=33613906" target="_blank" onclick="clicklog(124691)">【奥迪粉丝狂欢季】媳妇的座驾,晒</a><em>06月11日</em></li>
<li><i><a href="//www.xcar.com.cn/bbs/f703op1.html;" target="_blank" onclick="clicklog(124690)" ></a>|</i><a href="//www.xcar.com.cn/bbs/viewthread.php?tid=33585216" target="_blank" onclick="clicklog(124691)">【奥迪粉丝狂欢季】开着TT去虎门</a><em>06月09日</em></li>
<li><i><a href="//www.xcar.com.cn/bbs/f703op1.html;" target="_blank" onclick="clicklog(124690)" ></a>|</i><a href="//www.xcar.com.cn/bbs/viewthread.php?tid=33294331" target="_blank" onclick="clicklog(124691)">【进化论】魂动的蓝精灵,奥迪TTS极</a><em>05月24日</em></li>
<li><i><a href="//www.xcar.com.cn/bbs/f703op1.html;" target="_blank" onclick="clicklog(124690)" ></a>|</i><a href="//www.xcar.com.cn/bbs/viewthread.php?tid=33289170" target="_blank" onclick="clicklog(124691)">【奥迪粉丝狂欢季】帮老婆实现我小</a><em>05月23日</em></li>
<li><i><a href="//www.xcar.com.cn/bbs/f703op1.html;" target="_blank" onclick="clicklog(124690)" ></a>|</i><a href="//www.xcar.com.cn/bbs/viewthread.php?tid=33084030" target="_blank" onclick="clicklog(124691)">【X达人专享】自驾东南亚 修行老泰</a><em>05月04日</em></li>
</ul>
</div>
</div>
<!-- 文章&热帖 end-->
<!-- 贷款购 -->
<div class="model_main" id="get_t_car_loan"></div>
<!-- 贷款购 end-->
<!-- 二手车 -->
<div id="get_used2_cars"></div>
<!-- 二手车 end -->
<!-- 限时特惠 -->
<div id="get_limit_offer"></div>
<!-- 限时特惠 end -->
<!-- 您也许还想看看 -->
<div class="model_main">
<div class="model_tt"><h2>您也许还想看看</h2></div>
<ul class="choose_ul">
<li><em></em><a onclick="clicklog(124809);" title="奥迪TT双门报价" href="/3/baojia/" target="_blank">奥迪TT双门报价</a></li>
<li><em></em><a onclick="clicklog(124809);" title="奥迪TT双门优惠" href="//dealer.xcar.com.cn/info/0_0_1_0_3_0/" target="_blank">奥迪TT双门优惠</a></li>
<li><em></em><a onclick="clicklog(124809);" title="奥迪TT双门4s店" href="//dealer.xcar.com.cn/d1000/1_3.htm" target="_blank">奥迪TT双门4s店</a></li>
<li><em></em><a onclick="clicklog(124809);" title="奥迪TT双门图片" href="/photo/ps3/" target="_blank">奥迪TT双门图片</a></li>
<li><em></em><a onclick="clicklog(124809);" title="奥迪4s店" href="//dealer.xcar.com.cn/d1000/1.htm" target="_blank">奥迪4s店</a></li>
<li><em></em><a onclick="clicklog(124809);" title="奥迪TT双门怎么样" href="/3/review.htm" target="_blank">奥迪TT双门怎么样</a></li>
<li><em></em><a onclick="clicklog(124809);" title="奥迪TT双门论坛" href="//www.xcar.com.cn/bbs/forumdisplay.php?fid=703" target="_blank">奥迪TT双门论坛</a></li>
<li><em></em><a onclick="clicklog(124809);" title="奥迪(进口)4s店" href="//dealer.xcar.com.cn/d1000/1_10063.htm" target="_blank">奥迪(进口)4s店</a></li>
</ul>
</div><!-- 您也许还想看看 end-->
</div>
<!-- 栏目框架 end-->
<!-- 侧栏框架 -->
<div class="model_sd">
<div id="div_newd0_js_2042" ></div>
<div id="div_newd0_js_2043" ></div>
<div id='get_loan_cars' style='display:none'></div>
<!-- 全款购车 -->
<div class="model_main">
<div class="model_tt bd_d"><h3>全款购车</h3></div>
<div class="caked_car">
<div class="cost"><span>裸车价格:471800元</span></div>
<ul class="cost_ul">
<li>+ 购置税:40325 元</li>
<li>+ 交强险:950 元</li>
<li>+ 商业险:约13386 元</li>
<li>+ 车船税: 480 元</li>
<li>+ 上牌费: 500 元</li>
</ul>
<div class="total">参考成交价:<em>约527,400元</em></div>
<div class="view"><em></em><a href="/jisuanqi/quankuan/m35001/" target="_blank" onclick="clicklog(123709);">查看详细</a></div>
<p class="record">注:此结果仅供参考,实际费用以当地缴费为准</p>
</div>
</div>
<!-- 全款购车 end-->
<!-- 热门车型推荐 -->
<div class="model_main">
<div class="model_tt bd_d"><h3>热门车型推荐</h3><span class="more"><em></em><a href="/car/5-0-0-0-0-0-8-0-0-0-0-0/" onclick="clicklog(124668);" target="_blank">更多</a></span></div>
<div class="other_cn">
<dl class="else_dl ">
<dt><a onclick="clicklog(124759);" href="/m45776/" target="_blank" onclick="clicklog(124669)">Mustang2019款 2.3L EcoBoost</a></dt>
<dd>指导价:<em><a onclick="clicklog(124760);" href="/m45776/baojia/" target="_blank" onclick="clicklog(124670)"> 36.98 </a></em>万起</dd>
</dl>
<dl class="else_dl ">
<dt><a onclick="clicklog(124759);" href="/m32946/" target="_blank" onclick="clicklog(124671)">科迈罗2017款 RS</a></dt>
<dd>指导价:<em><a onclick="clicklog(124760);" href="/m32946/baojia/" target="_blank" onclick="clicklog(124672)"> 39.99 </a></em>万起</dd>
</dl>
<dl class="else_dl ">
<dt><a onclick="clicklog(124759);" href="/m46801/" target="_blank" onclick="clicklog(124671)">宝马Z42019款 sDrive 25i M运动套装版</a></dt>
<dd>指导价:<em><a onclick="clicklog(124760);" href="/m46801/baojia/" target="_blank" onclick="clicklog(124672)"> 48.88 </a></em>万起</dd>
</dl>
<dl class="else_dl ">
<dt><a onclick="clicklog(124759);" href="/m41989/" target="_blank" onclick="clicklog(124671)">雷克萨斯RC2019款 300 锋尚版</a></dt>
<dd>指导价:<em><a onclick="clicklog(124760);" href="/m41989/baojia/" target="_blank" onclick="clicklog(124672)"> 44.60 </a></em>万起</dd>
</dl>
<dl class="else_dl no_bd">
<dt><a onclick="clicklog(124759);" href="/m37326/" target="_blank" onclick="clicklog(124671)">奥迪TT双门2017款 40 TFSI</a></dt>
<dd>指导价:<em><a onclick="clicklog(124760);" href="/m37326/baojia/" target="_blank" onclick="clicklog(124672)"> 45.38 </a></em>万起</dd>
</dl>
</div>
</div>
<!-- 热门车型推荐 end-->
<!-- 还有什么车 -->
<div class="model_main">
<div class="model_tt bd_d"><h3>奥迪还有什么车</h3><span class="more"><em></em><a href="/price/pb1/" onclick="clicklog(123693);" target="_blank">更多</a></span></div>
<div class="other_cn">
<dl class="else_dl ">
<dt><a href="/8/" target="_blank" onclick="clicklog(124673)">奥迪A6L</a></dt>
<dd><span>指导价:</span>
<em><a href="/8/baojia/" target="_blank" onclick="clicklog(124674)">40.98-65.08</a></em>万 </dd>
<dd><span>关注度:</span><div class="heat"><div style="width: 100%"></div></div></dd>
</dl>
<dl class="else_dl ">
<dt><a href="/3865/" target="_blank" onclick="clicklog(124673)">奥迪Q5L</a></dt>
<dd><span>指导价:</span>
<em><a href="/3865/baojia/" target="_blank" onclick="clicklog(124674)">38.28-49.80</a></em>万 </dd>
<dd><span>关注度:</span><div class="heat"><div style="width: 93.0037716293%"></div></div></dd>
</dl>
<dl class="else_dl ">
<dt><a href="/553/" target="_blank" onclick="clicklog(124673)">奥迪A4L</a></dt>
<dd><span>指导价:</span>
<em><a href="/553/baojia/" target="_blank" onclick="clicklog(124674)">28.68-40.18</a></em>万 </dd>
<dd><span>关注度:</span><div class="heat"><div style="width: 80.2522097141%"></div></div></dd>
</dl>
<dl class="else_dl ">
<dt><a href="/1961/" target="_blank" onclick="clicklog(124673)">奥迪Q8</a></dt>
<dd><span>指导价:</span>
<em><a href="/1961/baojia/" target="_blank" onclick="clicklog(124674)">76.88-109.76</a></em>万 </dd>
<dd><span>关注度:</span><div class="heat"><div style="width: 35.8650274955%"></div></div></dd>
</dl>
<dl class="else_dl no_bd">
<dt><a href="/1784/" target="_blank" onclick="clicklog(124673)">奥迪Q3</a></dt>
<dd><span>指导价:</span>
<em><a href="/1784/baojia/" target="_blank" onclick="clicklog(124674)">23.42-35.98</a></em>万 </dd>
<dd><span>关注度:</span><div class="heat"><div style="width: 35.8333573259%"></div></div></dd>
</dl>
</div>
</div>
<!-- 还有什么车 end -->
</div>
<!-- 侧栏框架 end-->
</div>
<!-- 内容框架 end-->
<div class="brand clearfix">
<div class="brand_slide"><a class="active" href="javascript:void(0)">热门品牌</a>
<a href="//newcar.xcar.com.cn/car/0-0-0-0-0-0-9-0-0-0-0-0/" target="_blank">微型车</a>
<a href="//newcar.xcar.com.cn/car/0-0-0-0-0-0-1-0-0-0-0-0/" target="_blank">小型车</a>
<a href="//newcar.xcar.com.cn/car/0-0-0-0-0-0-2-0-0-0-0-0/" target="_blank">紧凑型车</a>
<a href="//newcar.xcar.com.cn/car/0-0-0-0-0-0-3-0-0-0-0-0/" target="_blank">中型车</a>
<a href="//newcar.xcar.com.cn/car/0-0-0-0-0-0-4-0-0-0-0-0/" target="_blank">中大型车</a>
<a href="//newcar.xcar.com.cn/car/0-0-0-0-0-0-5-0-0-0-0-0/" target="_blank">豪华车</a>
<a href="//newcar.xcar.com.cn/car/0-0-0-0-0-0-6-0-0-0-0-0/" target="_blank">MPV</a>
<a href="//newcar.xcar.com.cn/car/0-0-0-0-0-0-7-0-0-0-0-0/" target="_blank">SUV</a>
<a href="//newcar.xcar.com.cn/car/0-0-0-0-0-0-8-0-0-0-0-0/" target="_blank">跑车</a>
</div>
<div class="hotBrand">
<ul style="">
<li><i class="top" >1</i><a target="_blank" title="大众" href="/price/pb4/">大众</a>(关注度:130449)</li>
<li><i class="top" >2</i><a target="_blank" title="丰田" href="/price/pb18/">丰田</a>(关注度:116359)</li>
<li><i class="top" >3</i><a target="_blank" title="奥迪" href="/price/pb1/">奥迪</a>(关注度:104486)</li>
<li><i >4</i><a target="_blank" title="宝马" href="/price/pb2/">宝马</a>(关注度:89802)</li>
<li><i >5</i><a target="_blank" title="现代" href="/price/pb23/">现代</a>(关注度:88085)</li>
<li><i >6</i><a target="_blank" title="本田" href="/price/pb17/">本田</a>(关注度:87921)</li>
<li><i >7</i><a target="_blank" title="起亚" href="/price/pb22/">起亚</a>(关注度:84619)</li>
<li><i >8</i><a target="_blank" title="日产" href="/price/pb20/">日产</a>(关注度:80030)</li>
<li><i >9</i><a target="_blank" title="雪佛兰" href="/price/pb16/">雪佛兰</a>(关注度:71721)</li>
<li><i >10</i><a target="_blank" title="奔驰" href="/price/pb3/">奔驰</a>(关注度:69187)</li>
</ul>
<ul style="display:none">
<li><i class="top">1</i><a target="_blank" title="奔奔" href="/2447/">奔奔</a>(关注度:3695)</li>
<li><i class="top">2</i><a target="_blank" title="比亚迪F0" href="/258/">比亚迪F0</a>(关注度:3182)</li>
<li><i class="top">3</i><a target="_blank" title="smart fortwo" href="/566/">smart fortwo</a>(关注度:3108)</li>
<li><i>4</i><a target="_blank" title="奇瑞QQ" href="/1836/">奇瑞QQ</a>(关注度:1675)</li>
<li><i>5</i><a target="_blank" title="smart forfour" href="/2517/">smart forfour</a>(关注度:1666)</li>
<li><i>6</i><a target="_blank" title="乐驰" href="/143/">乐驰</a>(关注度:1240)</li>
<li><i>7</i><a target="_blank" title="知豆D2" href="/2988/">知豆D2</a>(关注度:1115)</li>
<li><i>8</i><a target="_blank" title="江南TT" href="/1332/">江南TT</a>(关注度:913)</li>
<li><i>9</i><a target="_blank" title="奇瑞eQ" href="/2702/">奇瑞eQ</a>(关注度:758)</li>
<li><i>10</i><a target="_blank" title="雷丁D50" href="/2660/">雷丁D50</a>(关注度:588)</li>
</ul>
<ul style="display:none">
<li><i class="top">1</i><a target="_blank" title="宝骏310" href="/3216/">宝骏310</a>(关注度:16266)</li>
<li><i class="top">2</i><a target="_blank" title="Polo两厢" href="/56/">Polo两厢</a>(关注度:15058)</li>
<li><i class="top">3</i><a target="_blank" title="飞度" href="/152/">飞度</a>(关注度:12216)</li>
<li><i>4</i><a target="_blank" title="YARiS L 致炫" href="/2380/">YARiS L 致炫</a>(关注度:9067)</li>
<li><i>5</i><a target="_blank" title="威驰" href="/167/">威驰</a>(关注度:7680)</li>
<li><i>6</i><a target="_blank" title="MINI" href="/336/">MINI</a>(关注度:5752)</li>
<li><i>7</i><a target="_blank" title="悦纳" href="/3264/">悦纳</a>(关注度:5129)</li>
<li><i>8</i><a target="_blank" title="赛欧三厢" href="/141/">赛欧三厢</a>(关注度:5074)</li>
<li><i>9</i><a target="_blank" title="起亚K2三厢" href="/1293/">起亚K2三厢</a>(关注度:4275)</li>
<li><i>10</i><a target="_blank" title="瑞纳" href="/1491/">瑞纳</a>(关注度:4187)</li>
</ul>
<ul style="display:none">
<li><i class="top">1</i><a target="_blank" title="奔腾B50" href="/969/">奔腾B50</a>(关注度:231966)</li>
<li><i class="top">2</i><a target="_blank" title="卡罗拉" href="/162/">卡罗拉</a>(关注度:46392)</li>
<li><i class="top">3</i><a target="_blank" title="凌渡" href="/2674/">凌渡</a>(关注度:36010)</li>
<li><i>4</i><a target="_blank" title="思域" href="/150/">思域</a>(关注度:33959)</li>
<li><i>5</i><a target="_blank" title="标致308" href="/1339/">标致308</a>(关注度:18191)</li>
<li><i>6</i><a target="_blank" title="科鲁兹三厢" href="/630/">科鲁兹三厢</a>(关注度:17781)</li>
<li><i>7</i><a target="_blank" title="蔚领" href="/3367/">蔚领</a>(关注度:17715)</li>
<li><i>8</i><a target="_blank" title="轩逸" href="/1608/">轩逸</a>(关注度:17666)</li>
<li><i>9</i><a target="_blank" title="帝豪GL" href="/3147/">帝豪GL</a>(关注度:16443)</li>
<li><i>10</i><a target="_blank" title="英朗" href="/2842/">英朗</a>(关注度:15303)</li>
</ul>
<ul style="display:none">
<li><i class="top">1</i><a target="_blank" title="起亚K4" href="/2496/">起亚K4</a>(关注度:56173)</li>
<li><i class="top">2</i><a target="_blank" title="奥迪A4L" href="/553/">奥迪A4L</a>(关注度:25571)</li>
<li><i class="top">3</i><a target="_blank" title="帕萨特" href="/601/">帕萨特</a>(关注度:19082)</li>
<li><i>4</i><a target="_blank" title="奔驰C级" href="/39/">奔驰C级</a>(关注度:18701)</li>
<li><i>5</i><a target="_blank" title="雅阁" href="/149/">雅阁</a>(关注度:18187)</li>
<li><i>6</i><a target="_blank" title="速派" href="/2369/">速派</a>(关注度:17270)</li>
<li><i>7</i><a target="_blank" title="君越" href="/1089/">君越</a>(关注度:16867)</li>
<li><i>8</i><a target="_blank" title="新蒙迪欧" href="/2348/">新蒙迪欧</a>(关注度:16380)</li>
<li><i>9</i><a target="_blank" title="雪铁龙C6" href="/3226/">雪铁龙C6</a>(关注度:15515)</li>
<li><i>10</i><a target="_blank" title="宝马3系" href="/21/">宝马3系</a>(关注度:14252)</li>
</ul>
<ul style="display:none">
<li><i class="top">1</i><a target="_blank" title="奔驰E级" href="/40/">奔驰E级</a>(关注度:25126)</li>
<li><i class="top">2</i><a target="_blank" title="奥迪A6L" href="/8/">奥迪A6L</a>(关注度:14685)</li>
<li><i class="top">3</i><a target="_blank" title="宝马5系" href="/22/">宝马5系</a>(关注度:14456)</li>
<li><i>4</i><a target="_blank" title="MODEL S" href="/1962/">MODEL S</a>(关注度:12282)</li>
<li><i>5</i><a target="_blank" title="雷克萨斯ES" href="/389/">雷克萨斯ES</a>(关注度:12056)</li>
<li><i>6</i><a target="_blank" title="众泰Z700" href="/2837/">众泰Z700</a>(关注度:7094)</li>
<li><i>7</i><a target="_blank" title="皇冠" href="/163/">皇冠</a>(关注度:6929)</li>
<li><i>8</i><a target="_blank" title="辉昂" href="/3187/">辉昂</a>(关注度:5597)</li>
<li><i>9</i><a target="_blank" title="捷豹XFL" href="/3292/">捷豹XFL</a>(关注度:5339)</li>
<li><i>10</i><a target="_blank" title="传祺GA8" href="/2907/">传祺GA8</a>(关注度:5268)</li>
</ul>
<ul style="display:none">
<li><i class="top">1</i><a target="_blank" title="总裁" href="/369/">总裁</a>(关注度:9136)</li>
<li><i class="top">2</i><a target="_blank" title="奔驰S级" href="/37/">奔驰S级</a>(关注度:8542)</li>
<li><i class="top">3</i><a target="_blank" title="宝马7系" href="/14/">宝马7系</a>(关注度:7669)</li>
<li><i>4</i><a target="_blank" title="奥迪A8L" href="/7/">奥迪A8L</a>(关注度:6759)</li>
<li><i>5</i><a target="_blank" title="Panamera" href="/745/">Panamera</a>(关注度:6482)</li>
<li><i>6</i><a target="_blank" title="迈巴赫S级" href="/2764/">迈巴赫S级</a>(关注度:4161)</li>
<li><i>7</i><a target="_blank" title="幻影" href="/358/">幻影</a>(关注度:4012)</li>
<li><i>8</i><a target="_blank" title="捷豹XJ" href="/353/">捷豹XJ</a>(关注度:3024)</li>
<li><i>9</i><a target="_blank" title="慕尚" href="/1147/">慕尚</a>(关注度:2676)</li>
<li><i>10</i><a target="_blank" title="古思特" href="/1139/">古思特</a>(关注度:2538)</li>
</ul>
<ul style="display:none">
<li><i class="top">1</i><a target="_blank" title="五菱宏光" href="/1217/">五菱宏光</a>(关注度:22827)</li>
<li><i class="top">2</i><a target="_blank" title="夏朗" href="/521/">夏朗</a>(关注度:9255)</li>
<li><i class="top">3</i><a target="_blank" title="奥德赛" href="/148/">奥德赛</a>(关注度:8574)</li>
<li><i>4</i><a target="_blank" title="别克GL8豪华商务" href="/1472/">别克GL8豪华商务</a>(关注度:6901)</li>
<li><i>5</i><a target="_blank" title="埃尔法" href="/1236/">埃尔法</a>(关注度:6110)</li>
<li><i>6</i><a target="_blank" title="艾力绅" href="/1558/">艾力绅</a>(关注度:5989)</li>
<li><i>7</i><a target="_blank" title="瑞风M3" href="/2562/">瑞风M3</a>(关注度:5136)</li>
<li><i>8</i><a target="_blank" title="欧尚" href="/2906/">欧尚</a>(关注度:4945)</li>
<li><i>9</i><a target="_blank" title="途安L" href="/3109/">途安L</a>(关注度:4935)</li>
<li><i>10</i><a target="_blank" title="菱智" href="/283/">菱智</a>(关注度:3527)</li>
</ul>
<ul style="display:none">
<li><i class="top">1</i><a target="_blank" title="众泰T600" href="/1314/">众泰T600</a>(关注度:103737)</li>
<li><i class="top">2</i><a target="_blank" title="冠道" href="/3261/">冠道</a>(关注度:45282)</li>
<li><i class="top">3</i><a target="_blank" title="博越" href="/3068/">博越</a>(关注度:34728)</li>
<li><i>4</i><a target="_blank" title="瑞虎7" href="/3227/">瑞虎7</a>(关注度:30032)</li>
<li><i>5</i><a target="_blank" title="汉兰达" href="/677/">汉兰达</a>(关注度:29716)</li>
<li><i>6</i><a target="_blank" title="途观" href="/658/">途观</a>(关注度:28911)</li>
<li><i>7</i><a target="_blank" title="启辰T70X" href="/3030/">启辰T70X</a>(关注度:28580)</li>
<li><i>8</i><a target="_blank" title="众泰SR9" href="/3313/">众泰SR9</a>(关注度:28446)</li>
<li><i>9</i><a target="_blank" title="缤智" href="/2581/">缤智</a>(关注度:24285)</li>
<li><i>10</i><a target="_blank" title="昂科威" href="/2638/">昂科威</a>(关注度:22001)</li>
</ul>
<ul style="display:none">
<li><i class="top">1</i><a target="_blank" title="Mustang" href="/731/">Mustang</a>(关注度:19758)</li>
<li><i class="top">2</i><a target="_blank" title="Aventador " href="/1299/">Aventador </a>(关注度:10091)</li>
<li><i class="top">3</i><a target="_blank" title="日产GT-R" href="/641/">日产GT-R</a>(关注度:8980)</li>
<li><i>4</i><a target="_blank" title="科迈罗" href="/730/">科迈罗</a>(关注度:8253)</li>
<li><i>5</i><a target="_blank" title="911" href="/333/">911</a>(关注度:7666)</li>
<li><i>6</i><a target="_blank" title="718" href="/3352/">718</a>(关注度:6214)</li>
<li><i>7</i><a target="_blank" title="丰田86" href="/1544/">丰田86</a>(关注度:5676)</li>
<li><i>8</i><a target="_blank" title="奥迪R8" href="/5/">奥迪R8</a>(关注度:5664)</li>
<li><i>9</i><a target="_blank" title="欧陆" href="/345/">欧陆</a>(关注度:5272)</li>
<li><i>10</i><a target="_blank" title="宝马i8" href="/1372/">宝马i8</a>(关注度:4606)</li>
</ul>
</div>
</div> <!-- 尾部框架 -->
<!-- 尾部框架 end-->
<script src="//icon.xcar.com.cn/2014/muban/js/selectbox.js" type="text/javascript"></script>
<!--降价通知弹窗-->
<!--降价通知弹窗 end-->
<!--右侧对比工具栏-->
<div class="return_coat" style="display: block;height:245px;" id="control_coat">
<div class="fast_pop fast_pop_70" id="fast_pop_a" style="display:none;" ><div class="fast_pop_txt">立即询价<br />享购车优惠</div><span class="fast_pop_close" id="fast_pop_close_x"></span></div>
<div class="fast_text fast_text_70" id="fast_pop_b" style="display:none;" ><a href="javascript:void(0)" class="a_link_fast">快速询底价</a></div>
<div class="return_db" id="return_db" style="">
<a href="javascript:void(0)" class="a_link">车型对比</a><!--滑过添加样式 a_hover -->
<!-- 对比弹出框 -->
<div class="compare_pop" id="compare_pop_wrap" style="display:none;">
<div class="title"><span>对比工具栏</span><a href="javascript:void(0)" class="pack_up" id="retract"><em></em>收起</a></div>
<div class="compare_cn">
<ul class="compare_ul cmp_show_block">
</ul>
<div class="compare_elect">
<!-- 品牌 -->
<div class="elect_col" style="display:none;" id="pb_block"><!-- 第一个框 -->
<div class="elect_tt"><a href="javascript:void(0)" class="yj_pb"><b>品牌</b></a></div>
<div class="elect_roll no_roll" >
<ul class="roll_l ul_cp_words"></ul> <!-- 放字母 -->
<div class="roll_r roll_off roll_pb_croll">
<ul class="roll_ul ul_pb_words"></ul><!-- 放父品牌 -->
</div>
</div>
</div>
<!-- 品牌 end-->
<!-- 品牌 车系-->
<div class="elect_col" style="display:none" id="ps_block"><!-- 第2个框 -->
<div class="elect_tt"><a href="javascript:void(0)" class="yj_pb">品牌</a><span>></span><a href="javascript:void(0)" class="yj_ps"><b>车系</b></a></div>
<div class="elect_roll">
<ul class="roll_ul ul_ps_words"></ul><!-- 放父车系 -->
</div>
</div>
<!-- 品牌 车系 end-->
<!-- 品牌 车系 车型-->
<div class="elect_col" style="display:none" id="m_block"><!-- 第3个框 -->
<div class="elect_tt"><a href="javascript:void(0)" class="yj_pb">品牌</a><span>></span><a href="javascript:void(0)" class="yj_ps">车系</a><span>></span><a href="javascript:void(0)"><b>车型</b></a></div>
<div class="elect_roll">
<ul class="roll_ul ul_m_words"></ul>
</div>
</div>
<!-- 品牌 车系 车型 end-->
<div class="elect_main">
<div class="elect_txt" id="s_pb_block"> <em></em>请选择</div>
</div>
</div>
<div class="elect_bt">
<a href="javascript:void(0)" class="blue_but" id="beginCmp" data-key="" target="_blank">开始对比</a>
<span id="alert_message">最多对比6款车型</span>
<a href="javascript:void(0)" class="pruge" id="emptyAllCmp" >全部清空</a>
</div>
<!--推荐车型-->
<div class="elect_rm" id="ad_contain_div">
</div>
<!--推荐车型 end-->
</div>
</div>
<!-- 对比弹出框 end-->
</div><div id="wxbackgroung" class="graybg_pop ie6fixed_t" style="display:none"></div>
<div class="return_fx" id="return_fx">
<a href="javascript:void(0)" class="a_link">分享</a>
<div class="bdsharebuttonbox share_pop" style="display: none;">
<a title="分享到新浪微博" href="javascript:;" class="sina " data-cmd="tsina"></a>
<a title="分享到QQ空间" href="javascript:;" class="kj bds_qzone" data-cmd="qzone"></a>
<a title="分享到微信" href="javascript:;" class="wx bds_weixin bgimg"></a>
<a title="分享到QQ好友" href="javascript:;" class="qq bds_sqq" data-cmd="sqq"></a>
<div class="wx_share" style="display: none">
<div class="wx_wt">
<p>扫二维码 分享朋友圈</p>
<div class="wx_img"><img id="qrcode" style="height:130;width:130px" src="//hezuo.xcar.com.cn/index.php?partner=qrcode&conv=0&url=http://newcar.xcar.com.cn/3"></div>
<a href="//hezuo.xcar.com.cn/index.php?partner=weixin_share&conv=0&url=%2F%2Fnewcar.xcar.com.cn%2Fm35001&title=%E3%80%90%E5%A5%A5%E8%BF%AATT%E5%8F%8C%E9%97%A82017%E6%AC%BE45+TFSI%E6%8A%A5%E4%BB%B7_%E5%9B%BE%E7%89%87_%E5%8F%82%E6%95%B0%E3%80%91_%E5%A5%A5%E8%BF%AA%28%E8%BF%9B%E5%8F%A3%29%E5%A5%A5%E8%BF%AATT%E5%8F%8C%E9%97%A8%E6%80%8E%E4%B9%88%E6%A0%B7_%E7%88%B1%E5%8D%A1%E6%B1%BD%E8%BD%A6" target="_blank" class="wx_use">还不知道怎么用?</a>
</div>
</div>
</div>
</div>
<div class="return_fh" id="return_fh" style="display:none"><a href="javascript:;">回到顶部</a></div>
</div>
<!--右侧对比工具栏 end-->
<script type="text/javascript" src="//dx0.xcar.com.cn/dsp/adpc?appId=M7nuyi&deviceType=2&posId=1179&site_page=newcar.xcar.com.cn/m35001/&site_ref=http://newcar.xcar.com.cn/3/&dx_ggw_series_id=3"></script><script type="text/javascript" src="//dx0.xcar.com.cn/dsp/adpc?appId=M7nuyi&deviceType=2&posId=2042&site_page=newcar.xcar.com.cn/m35001/&site_ref=http://newcar.xcar.com.cn/3/&dx_ggw_series_id=3"></script><script type="text/javascript" src="//dx0.xcar.com.cn/dsp/adpc?appId=M7nuyi&deviceType=2&posId=2043&site_page=newcar.xcar.com.cn/m35001/&site_ref=http://newcar.xcar.com.cn/3/&dx_ggw_series_id=3"></script><script type="text/javascript" src="//dx0.xcar.com.cn/dsp/adpc?appId=M7nuyi&deviceType=2&posId=2044&site_page=newcar.xcar.com.cn/m35001/&site_ref=http://newcar.xcar.com.cn/3/&dx_ggw_series_id=3"></script><script type="text/javascript" src="//dx0.xcar.com.cn/dsp/adpc?appId=M7nuyi&deviceType=2&posId=2239&site_page=newcar.xcar.com.cn/m35001/&site_ref=http://newcar.xcar.com.cn/3/&dx_ggw_series_id=3"></script>
<!-- new 下侧 过完十一删掉 -->
<link type="text/css" rel="stylesheet" href="//icon.xcar.com.cn/2016/DemioModel/css/chexi.css">
<style type="text/css">
.newfixbottom { width: 1000px; margin-left: -500px;}
.fixedtitle { width: 1000px;}
.newfixbottom .fixedtitle ul { width: 953px; width: 952px\0; _width: 952px;}
</style>
<script>
$(function(){});
</script>
<!-- 工具栏 -->
<script type="text/javascript">
$(function(){
var cur_mid = "35001";
var cur_pserid = "3";
/*底部关注排行*/
$('.brand_slide a').hover(
function(){
$(this).addClass('active').siblings().removeClass('active');
$('.hotBrand ul:eq(' + $(this).index() + ')').show().siblings().hide();
}
);
/**car select color**/
var car_sel_color_timer = null;
/*$(".car_select_color_new").hover(function(){
if(car_sel_color_timer!=null){
clearTimeout(car_sel_color_timer);
}
$(this).addClass('cur').siblings().removeClass("cur");
var rel = $(this).attr("rel");
var imgsrc = rel ? rel : "//icon.xcar.com.cn/2011newcar/images/auto/car_default.jpg";
var photo_url = $("#hid_picurl").val() || "//newcar.xcar.com.cn/photo/m" + cur_mid;
var aobj = $(this).parents(".focus_cn").find(".focus_big a.imga_new");
$(this).parents(".focus_cn").find(".focus_big img.color_car_img_new").fadeOut("slow", function(){
$(this).attr("src", imgsrc).fadeIn();
});
if(rel){
aobj.attr("href", photo_url);
}else{
aobj.attr("href", "javascript:void(0);").attr("target","").css({"cursor":"default"});
}
},function(){
if(car_sel_color_timer!=null){
clearTimeout(car_sel_color_timer);
}
var pobj = $(this).parents(".focus_cn");
pobj.find(".cur").removeClass("cur");
car_sel_color_timer = setTimeout(function(){
$(".color_car_img_new").stop().css({"opacity":"1"});
var imgobj = pobj.find(".focus_big img.color_car_img_new");
imgobj.attr("src", imgobj.attr("defaultimg"));
var aobj = imgobj.parent();
if(aobj.attr("thref") != ""){
aobj.attr("href", aobj.attr("thref")).attr("target","_blank").css({"cursor":"pointer"});
}
},500);
});*/
/* 引导图*/
$(".color_car_img_new").hover(function(){
if(car_sel_color_timer!=null){
clearTimeout(car_sel_color_timer);
}
},function(){
if(car_sel_color_timer!=null){
clearTimeout(car_sel_color_timer);
}
var pobj = $(this).parents(".focus_cn");
car_sel_color_timer = setTimeout(function(){
$(".color_car_img_new").stop().css({"opacity":"1"});
var imgobj = pobj.find(".focus_big img.color_car_img_new");
imgobj.attr("src", imgobj.attr("defaultimg"));
var aobj = imgobj.parent();
if(aobj.attr("thref") !== undefined && aobj.attr("thref") != ""){
aobj.attr("href", aobj.attr("thref")).attr("target","_blank").css({"cursor":"pointer"});
}
},500);
});
//更多颜色效果
$(".hue_more").click(function(){
if($(".hue_on").hasClass('hue_off')){
$(".hue_on").removeClass('hue_off');
$(".hue_main").hide();
}else{
$(".hue_on").addClass('hue_off');
$(".hue_main").show();
}
})
//加个点击空白 更多颜色收起
$(document).bind('click',function(event){
if(event.target.nodeName == 'HTML'|| event.target.nodeName != 'A'){
if($(".hue_on").hasClass('hue_off')){
$(".hue_on").removeClass('hue_off');
$(".hue_main").hide();
}
}
})
var model_city_id = city_id || 475;
var model_city_name = city_name || '';
var zoneclick_val = 2;
// var jump_url = "//price.xcar.com.cn/model"+cur_mid+"/city"+model_city_id+"-1-1.htm";
var jump_url = "/m"+cur_mid+"/baojia/";
$("#preferential").attr({href:jump_url}); //至少优惠 价格数字附链接
$("#reference").attr({href:jump_url});// 本地参考价 价格数字附链接
if(model_city_name){
$(".local2_name h2 a").html(model_city_name+'经销商报价');
//$("#local_url").attr('href','//price.xcar.com.cn/model'+cur_mid+'/city'+model_city_id+'-1-1.htm');
$("#local_url").attr('href','/m'+cur_mid+'/baojia/');
}
//异步填充经销商
$.ajax({
type:"GET",
url:"/auto/index.php?r=newcar/ModelIndex/GetDealerAjax",
data:{zoneclick:zoneclick_val,pserid:cur_pserid,mid:cur_mid,city_id:model_city_id,iss:1,rand: getRand()},
success:function(data){
$("#sync_dealer_list").html(data);
checkDealer();
}
})
var used2lowprice = 0;
//二手车
$.getJSON(
'/auto/index.php?r=ajax/GetDealerPrice2&flag=1&did_type=1&is_num=1&sort_price=1&province_id='+ province_id +'&city_id=' + city_id + "&pserid=" + pserid + "&rand=" + getRand(),
function(res){
if(res.model_list){
$.each(res.model_list,function(i,item){
if(item['mid'] == cur_mid){
used2lowprice = item['min_price']
}
});
}
$.ajax({
type:"GET",
url:"/auto/index.php?r=newcar/ModelIndex/Ajax_used2_car",
data:{mid:cur_mid,provinceId:province_id,cityId:city_id,max_price:0,min_price:used2lowprice,rand: getRand()},
success:function(data){
if(data != ""){
$("#get_used2_cars").html(data);
$('#get_used2_cars').show();
}
}
});
})
/**
*车贷相关
* @param pserid
* @param city_id
* @param type
*/
function get_loan_cars(mid,city_id){
var url = "/auto/index.php?r=Ajax/AjaxLoanCar&rand=" + getRand();
$.ajax({
url:url,
data:{mid:mid,city_id:city_id,type:2},
success:function(data){
if(data != ""){
$("#get_loan_cars").html(data);
$('#get_loan_cars').show();
}
}
});
}
get_loan_cars(mid,city_id);
/**
*贷款购相关
* @param pserid
* @param city_id
* @param mid
*/
function get_t_loan_cars(pserid,mid,city_id){
var url = "/auto/index.php?r=Ajax/TloanCar";
$.ajax({
url:url,
data:{pserid:pserid,mid:mid,city:city_id},
success:function(data){
if(data != ""){
$("#get_t_car_loan").html(data);
$('#get_t_car_loan').show();
}
}
});
}
get_t_loan_cars(pserid,mid,city_id);
/**
*限时特惠
* @param pserid
* @param city_id
* @param type
*/
function get_limit_offer(type_id){
var url = "/auto/index.php?r=Ajax/AjaxGetLimitOffer&rand=" + getRand();
$.ajax({
url:url,
data:{type_id:type_id},
success:function(data){
if(data != ""){
$("#get_limit_offer").html(data);
$('#get_limit_offer').show();
}
}
});
}
get_limit_offer(2);
//切换城市异步请求经销商数据
$('.pub_city_but').bind('click',function(){
var zoneclick_val = 2;
var cityName = $(".cityName").html();
var _province_id = $('.province_id').val();
var _city_id = $('.city_id').val();
$.ajax({
type:"GET",
url:"/auto/index.php?r=newcar/ModelIndex/GetDealerAjax",
data:{mid:cur_mid,city_id:_city_id,iss:1,page:1,order:0,zoneclick:zoneclick_val,rand: getRand()},
success:function(data){
$("#sync_dealer_list").html(data);
if(cityName!='选择城市'){
$(".local2_name h2 a").html(cityName+'经销商报价');
//$("#local_url").attr('href','//price.xcar.com.cn/model'+cur_mid+'/city'+_city_id+'-1-1.htm');
$("#local_url").attr('href','/m'+cur_mid+'/baojia/');
$(".deal_bk a").removeClass('cur');
$(".deal_bk a").eq(0).addClass('cur');//切换城市返回经销商默认选中4s
}
//二手车
$.getJSON(
'/auto/index.php?r=ajax/GetDealerPrice2&flag=1&did_type=1&is_num=1&sort_price=1&province_id='+ _province_id +'&city_id=' + _city_id + "&pserid=" + pserid + "&rand=" + getRand(),
function(res){
if(res.model_list){
$.each(res.model_list,function(i,item){
if(item['mid'] == cur_mid){
used2lowprice = item['min_price']
}
});
}
$.ajax({
type:"GET",
url:"/auto/index.php?r=newcar/ModelIndex/Ajax_used2_car",
data:{mid:cur_mid,provinceId:_province_id,cityId:_city_id,max_price:0,min_price:used2lowprice,rand: getRand()},
success:function(data){
if(data != ""){
$("#get_used2_cars").html(data);
$('#get_used2_cars').show();
}
}
});
})
get_loan_cars(mid,_city_id);
}
})
});
//经销商选项卡
var timer_interval = null;
$(".deal_bk a").each(function(i){
$(this).mouseover(function(){
var that = $(this);
timer_interval = setInterval(function(){
$(".deal_bk a").removeClass('cur');
that.addClass('cur');
$(".4s_com_block").hide();
$(".4s_com_block").eq(i).show();
clearInterval(timer_interval);
}, 500);
}).mouseout(function(){
if(timer_interval != null)clearInterval(timer_interval);
})
});
function getRand(){
return Math.random();
}
})
</script>
<!-- seo -->
<link href="//icon.xcar.com.cn/2018/css/g-links.css" rel="stylesheet" type="text/css" />
<div id="internal_chain_links" class="g-links">
<div class="g-content">
<dl id="dl_ci_ps_show" class="g-link-group">
<dt class="g-link-cls">车系找车:</dt>
<dd class="g-link-items clearfix sort-items">
<a href="javascript:;" do="ic_show_ps">A</a>
<a href="javascript:;" do="ic_show_ps">B</a>
<a href="javascript:;" do="ic_show_ps">C</a>
<a href="javascript:;" do="ic_show_ps">D</a>
<a href="javascript:;" do="ic_show_ps">E</a>
<a href="javascript:;" do="ic_show_ps">F</a>
<a href="javascript:;" do="ic_show_ps">G</a>
<a href="javascript:;" do="ic_show_ps">H</a>
<a href="javascript:;" do="ic_show_ps">I</a>
<a href="javascript:;" do="ic_show_ps">J</a>
<a href="javascript:;" do="ic_show_ps">K</a>
<a href="javascript:;" do="ic_show_ps">L</a>
<a href="javascript:;" do="ic_show_ps">M</a>
<a href="javascript:;" do="ic_show_ps">N</a>
<a href="javascript:;" do="ic_show_ps">O</a>
<a href="javascript:;" do="ic_show_ps">P</a>
<a href="javascript:;" do="ic_show_ps">Q</a>
<a href="javascript:;" do="ic_show_ps">R</a>
<a href="javascript:;" do="ic_show_ps">S</a>
<a href="javascript:;" do="ic_show_ps">T</a>
<a href="javascript:;" do="ic_show_ps">V</a>
<a href="javascript:;" do="ic_show_ps">W</a>
<a href="javascript:;" do="ic_show_ps">X</a>
<a href="javascript:;" do="ic_show_ps">Y</a>
<a href="javascript:;" do="ic_show_ps">Z</a>
<a href="javascript:;" style='width:38px;' do="ic_show_ps">其它</a>
</dd>
<dd class="g-link-items clearfix">
<ul do="ic_show_ps_content" >
<li><a href="//newcar.xcar.com.cn/2516/" target="_blank" title="艾5">艾5</a></li>
<li><a href="//newcar.xcar.com.cn/2/" target="_blank" title="AUDIA4ALLROAD">AUDIA4ALLROAD</a></li>
<li><a href="//newcar.xcar.com.cn/2523/" target="_blank" title="阿特兹">阿特兹</a></li>
<li><a href="//newcar.xcar.com.cn/1442/" target="_blank" title="奥迪TTS敞篷">奥迪TTS敞篷</a></li>
<li><a href="//newcar.xcar.com.cn/1733/" target="_blank" title="昂克拉">昂克拉</a></li>
<li><a href="//newcar.xcar.com.cn/2638/" target="_blank" title="昂科威20T">昂科威20T</a></li>
<li><a href="//newcar.xcar.com.cn/1626/" target="_blank" title="奥迪TT RS ">奥迪TT RS </a></li>
<li><a href="//newcar.xcar.com.cn/2899/" target="_blank" title="AX3 ">AX3 </a></li>
<li><a href="//newcar.xcar.com.cn/2524/" target="_blank" title="昂克赛拉">昂克赛拉</a></li>
<li><a href="//newcar.xcar.com.cn/1733/" target="_blank" title="昂科拉ENCORE">昂科拉ENCORE</a></li>
<li><a href="//newcar.xcar.com.cn/553/" target="_blank" title="奥迪A4">奥迪A4</a></li>
<li><a href="//newcar.xcar.com.cn/1845/" target="_blank" title="A级AMG">A级AMG</a></li>
<li><a href="//newcar.xcar.com.cn/2388/" target="_blank" title="爱丽舍汽车">爱丽舍汽车</a></li>
<li><a href="//newcar.xcar.com.cn/2/" target="_blank" title="奥迪A4 allroad">奥迪A4 allroad</a></li>
<li><a href="//newcar.xcar.com.cn/7/" target="_blank" title="奥迪A8">奥迪A8</a></li>
<li><a href="//newcar.xcar.com.cn/1825/" target="_blank" title="奥迪7RS">奥迪7RS</a></li>
<li><a href="//newcar.xcar.com.cn/2/" target="_blank" title="奥迪ALLROAD">奥迪ALLROAD</a></li>
<li><a href="//newcar.xcar.com.cn/2353/" target="_blank" title="奥铃CTX卡车">奥铃CTX卡车</a></li>
<li><a href="//newcar.xcar.com.cn/1825/" target="_blank" title="audirs7">audirs7</a></li>
<li><a href="//newcar.xcar.com.cn/1522/" target="_blank" title="奥迪S7">奥迪S7</a></li>
</ul>
<ul do="ic_show_ps_content" style="display:none;" >
<li><a href="//newcar.xcar.com.cn/22/" target="_blank" title="BMW5系">BMW5系</a></li>
<li><a href="//newcar.xcar.com.cn/2606/" target="_blank" title="宝马4四门">宝马4四门</a></li>
<li><a href="//newcar.xcar.com.cn/450/" target="_blank" title="B级">B级</a></li>
<li><a href="//newcar.xcar.com.cn/1371/" target="_blank" title="宝马电动车I3">宝马电动车I3</a></li>
<li><a href="//newcar.xcar.com.cn/10/" target="_blank" title="BMWF15">BMWF15</a></li>
<li><a href="//newcar.xcar.com.cn/25/" target="_blank" title="奔驰SL300">奔驰SL300</a></li>
<li><a href="//newcar.xcar.com.cn/39/" target="_blank" title="奔驰戴克300C">奔驰戴克300C</a></li>
<li><a href="//newcar.xcar.com.cn/1886/" target="_blank" title="奔驰CLA级AMG ">奔驰CLA级AMG </a></li>
<li><a href="//newcar.xcar.com.cn/2883/" target="_blank" title="奔驰GLE AMG">奔驰GLE AMG</a></li>
<li><a href="//newcar.xcar.com.cn/11/" target="_blank" title="宝马525I">宝马525I</a></li>
<li><a href="//newcar.xcar.com.cn/22/" target="_blank" title="宝马535LI">宝马535LI</a></li>
<li><a href="//newcar.xcar.com.cn/3099/" target="_blank" title="奔驰GLC ">奔驰GLC </a></li>
<li><a href="//newcar.xcar.com.cn/3019/" target="_blank" title="北汽绅宝X25suv">北汽绅宝X25suv</a></li>
<li><a href="//newcar.xcar.com.cn/1384/" target="_blank" title="别克GS">别克GS</a></li>
<li><a href="//newcar.xcar.com.cn/25/" target="_blank" title="奔驰SL级进口">奔驰SL级进口</a></li>
<li><a href="//newcar.xcar.com.cn/2686/" target="_blank" title="宝马2敞篷">宝马2敞篷</a></li>
<li><a href="//newcar.xcar.com.cn/4602/" target="_blank" title="宝马X2">宝马X2</a></li>
<li><a href="//newcar.xcar.com.cn/25/" target="_blank" title="奔驰SL级">奔驰SL级</a></li>
<li><a href="//newcar.xcar.com.cn/1039/" target="_blank" title="北汽2024">北汽2024</a></li>
<li><a href="//newcar.xcar.com.cn/2484/" target="_blank" title="奔驰S500双门">奔驰S500双门</a></li>
</ul>
<ul do="ic_show_ps_content" style="display:none;" >
<li><a href="//newcar.xcar.com.cn/3165/" target="_blank" title="长安微型车M90">长安微型车M90</a></li>
<li><a href="//newcar.xcar.com.cn/2693/" target="_blank" title="成功V1微型">成功V1微型</a></li>
<li><a href="//newcar.xcar.com.cn/2694/" target="_blank" title="成功汽车V2">成功汽车V2</a></li>
<li><a href="//newcar.xcar.com.cn/3017/" target="_blank" title="C4世嘉">C4世嘉</a></li>
<li><a href="//newcar.xcar.com.cn/3165/" target="_blank" title="长安睿行M90">长安睿行M90</a></li>
<li><a href="//newcar.xcar.com.cn/4455/" target="_blank" title="昌河北斗星X5">昌河北斗星X5</a></li>
<li><a href="//newcar.xcar.com.cn/1923/" target="_blank" title="长安马自达CX-5">长安马自达CX-5</a></li>
<li><a href="//newcar.xcar.com.cn/2474/" target="_blank" title="创酷TRAX">创酷TRAX</a></li>
<li><a href="//newcar.xcar.com.cn/2850/" target="_blank" title="C31微卡 ">C31微卡 </a></li>
<li><a href="//newcar.xcar.com.cn/1596/" target="_blank" title="长城皮卡风骏5">长城皮卡风骏5</a></li>
<li><a href="//newcar.xcar.com.cn/2850/" target="_blank" title="C31小卡">C31小卡</a></li>
<li><a href="//newcar.xcar.com.cn/3141/" target="_blank" title="cx4马自达">cx4马自达</a></li>
<li><a href="//newcar.xcar.com.cn/730/" target="_blank" title="CAMARO">CAMARO</a></li>
<li><a href="//newcar.xcar.com.cn/1250/" target="_blank" title="长安之星7">长安之星7</a></li>
<li><a href="//newcar.xcar.com.cn/2555/" target="_blank" title="传祺GA6">传祺GA6</a></li>
<li><a href="//newcar.xcar.com.cn/39/" target="_blank" title="C180">C180</a></li>
<li><a href="//newcar.xcar.com.cn/2655/" target="_blank" title="敞篷宝马M4">敞篷宝马M4</a></li>
<li><a href="//newcar.xcar.com.cn/3165/" target="_blank" title="长安睿行M90微型车">长安睿行M90微型车</a></li>
<li><a href="//newcar.xcar.com.cn/3231/" target="_blank" title="CDX">CDX</a></li>
<li><a href="//newcar.xcar.com.cn/3426/" target="_blank" title="长城C30 EV">长城C30 EV</a></li>
</ul>
<ul do="ic_show_ps_content" style="display:none;" >
<li><a href="//newcar.xcar.com.cn/3874/" target="_blank" title="大指挥官">大指挥官</a></li>
<li><a href="//newcar.xcar.com.cn/56/" target="_blank" title="大众菠萝">大众菠萝</a></li>
<li><a href="//newcar.xcar.com.cn/1696/" target="_blank" title="东风K01">东风K01</a></li>
<li><a href="//newcar.xcar.com.cn/62/" target="_blank" title="大众汽车速腾">大众汽车速腾</a></li>
<li><a href="//newcar.xcar.com.cn/2571/" target="_blank" title="DS6">DS6</a></li>
<li><a href="//newcar.xcar.com.cn/1595/" target="_blank" title="东风御风物流车">东风御风物流车</a></li>
<li><a href="//newcar.xcar.com.cn/601/" target="_blank" title="大众MODELZ">大众MODELZ</a></li>
<li><a href="//newcar.xcar.com.cn/3700/" target="_blank" title="道达V8">道达V8</a></li>
<li><a href="//newcar.xcar.com.cn/2218/" target="_blank" title="东风风行X5">东风风行X5</a></li>
<li><a href="//newcar.xcar.com.cn/284/" target="_blank" title="东风风神景逸">东风风神景逸</a></li>
<li><a href="//newcar.xcar.com.cn/1697/" target="_blank" title="东风小康K02小货车">东风小康K02小货车</a></li>
<li><a href="//newcar.xcar.com.cn/3811/" target="_blank" title="DS 7">DS 7</a></li>
<li><a href="//newcar.xcar.com.cn/1742/" target="_blank" title="东风小康C37面包车">东风小康C37面包车</a></li>
<li><a href="//newcar.xcar.com.cn/2431/" target="_blank" title="东风标致2008">东风标致2008</a></li>
<li><a href="//newcar.xcar.com.cn/1134/" target="_blank" title="大柴神">大柴神</a></li>
<li><a href="//newcar.xcar.com.cn/2850/" target="_blank" title="东风小康C31小卡">东风小康C31小卡</a></li>
<li><a href="//newcar.xcar.com.cn/2383/" target="_blank" title="DS 5">DS 5</a></li>
<li><a href="//newcar.xcar.com.cn/2621/" target="_blank" title="东风小康C36微型">东风小康C36微型</a></li>
<li><a href="//newcar.xcar.com.cn/2851/" target="_blank" title="东风小康C32轻卡">东风小康C32轻卡</a></li>
<li><a href="//newcar.xcar.com.cn/937/" target="_blank" title="东风C5">东风C5</a></li>
</ul>
<ul do="ic_show_ps_content" style="display:none;" >
<li><a href="//newcar.xcar.com.cn/2923/" target="_blank" title="E30纯电">E30纯电</a></li>
<li><a href="//newcar.xcar.com.cn/389/" target="_blank" title="ES350">ES350</a></li>
<li><a href="//newcar.xcar.com.cn/2638/" target="_blank" title="ENVISION">ENVISION</a></li>
<li><a href="//newcar.xcar.com.cn/2638/" target="_blank" title="ENVISION昂科威">ENVISION昂科威</a></li>
<li><a href="//newcar.xcar.com.cn/40/" target="_blank" title="E260L">E260L</a></li>
<li><a href="//newcar.xcar.com.cn/40/" target="_blank" title="E300">E300</a></li>
<li><a href="//newcar.xcar.com.cn/3107/" target="_blank" title="e950">e950</a></li>
<li><a href="//newcar.xcar.com.cn/3563/" target="_blank" title="ES8">ES8</a></li>
<li><a href="//newcar.xcar.com.cn/2847/" target="_blank" title="EX80">EX80</a></li>
<li><a href="//newcar.xcar.com.cn/389/" target="_blank" title="ES级">ES级</a></li>
<li><a href="//newcar.xcar.com.cn/1468/" target="_blank" title="E级双门轿跑车(进口)">E级双门轿跑车(进口)</a></li>
<li><a href="//newcar.xcar.com.cn/40/" target="_blank" title="E级加长(版)">E级加长(版)</a></li>
<li><a href="//newcar.xcar.com.cn/1733/" target="_blank" title="ENCORE昂科拉">ENCORE昂科拉</a></li>
<li><a href="//newcar.xcar.com.cn/40/" target="_blank" title="e180">e180</a></li>
<li><a href="//newcar.xcar.com.cn/3260/" target="_blank" title="eRX5荣威">eRX5荣威</a></li>
<li><a href="//newcar.xcar.com.cn/1468/" target="_blank" title="E级双门轿跑车进口">E级双门轿跑车进口</a></li>
<li><a href="//newcar.xcar.com.cn/40/" target="_blank" title="E级轿车">E级轿车</a></li>
<li><a href="//newcar.xcar.com.cn/2591/" target="_blank" title="ESCORT福睿斯">ESCORT福睿斯</a></li>
<li><a href="//newcar.xcar.com.cn/3816/" target="_blank" title="ENCINO 昂希诺">ENCINO 昂希诺</a></li>
<li><a href="//newcar.xcar.com.cn/1405/" target="_blank" title="ECOSPORT">ECOSPORT</a></li>
</ul>
<ul do="ic_show_ps_content" style="display:none;" >
<li><a href="//newcar.xcar.com.cn/2560/" target="_blank" title="风景G7商务车">风景G7商务车</a></li>
<li><a href="//newcar.xcar.com.cn/3991/" target="_blank" title="风行T5">风行T5</a></li>
<li><a href="//newcar.xcar.com.cn/1267/" target="_blank" title="福特F-150 猛禽">福特F-150 猛禽</a></li>
<li><a href="//newcar.xcar.com.cn/2875/" target="_blank" title="福迪雄狮F22">福迪雄狮F22</a></li>
<li><a href="//newcar.xcar.com.cn/2936/" target="_blank" title="丰田雷凌双擎">丰田雷凌双擎</a></li>
<li><a href="//newcar.xcar.com.cn/2475/" target="_blank" title="福美来">福美来</a></li>
<li><a href="//newcar.xcar.com.cn/757/" target="_blank" title="FORTE福瑞迪 ">FORTE福瑞迪 </a></li>
<li><a href="//newcar.xcar.com.cn/3052/" target="_blank" title="风光330">风光330</a></li>
<li><a href="//newcar.xcar.com.cn/4229/" target="_blank" title="富康ES500">富康ES500</a></li>
<li><a href="//newcar.xcar.com.cn/2902/" target="_blank" title="福特Taurus">福特Taurus</a></li>
<li><a href="//newcar.xcar.com.cn/2521/" target="_blank" title="风行景逸X3">风行景逸X3</a></li>
<li><a href="//newcar.xcar.com.cn/2911/" target="_blank" title="风行F600">风行F600</a></li>
<li><a href="//newcar.xcar.com.cn/566/" target="_blank" title="FORTWO(进口)">FORTWO(进口)</a></li>
<li><a href="//newcar.xcar.com.cn/4106/" target="_blank" title="风骏7">风骏7</a></li>
<li><a href="//newcar.xcar.com.cn/1554/" target="_blank" title="福田皮卡拓陆者">福田皮卡拓陆者</a></li>
<li><a href="//newcar.xcar.com.cn/1590/" target="_blank" title="福克斯两厢">福克斯两厢</a></li>
<li><a href="//newcar.xcar.com.cn/757/" target="_blank" title="福瑞迪两厢">福瑞迪两厢</a></li>
<li><a href="//newcar.xcar.com.cn/2218/" target="_blank" title="风行X5">风行X5</a></li>
<li><a href="//newcar.xcar.com.cn/757/" target="_blank" title="福瑞迪汽车">福瑞迪汽车</a></li>
<li><a href="//newcar.xcar.com.cn/2218/" target="_blank" title="风行景逸X5">风行景逸X5</a></li>
</ul>
<ul do="ic_show_ps_content" style="display:none;" >
<li><a href="//newcar.xcar.com.cn/2754/" target="_blank" title="观致3都市SUV">观致3都市SUV</a></li>
<li><a href="//newcar.xcar.com.cn/1093/" target="_blank" title="高尔夫车">高尔夫车</a></li>
<li><a href="//newcar.xcar.com.cn/561/" target="_blank" title="广本锋范">广本锋范</a></li>
<li><a href="//newcar.xcar.com.cn/2654/" target="_blank" title="国产Q50L">国产Q50L</a></li>
<li><a href="//newcar.xcar.com.cn/2431/" target="_blank" title="国产2008">国产2008</a></li>
<li><a href="//newcar.xcar.com.cn/27/" target="_blank" title="GCLASS">GCLASS</a></li>
<li><a href="//newcar.xcar.com.cn/553/" target="_blank" title="国产A4">国产A4</a></li>
<li><a href="//newcar.xcar.com.cn/2550/" target="_blank" title="GC9吉利 ">GC9吉利 </a></li>
<li><a href="//newcar.xcar.com.cn/1937/" target="_blank" title="国产标致301">国产标致301</a></li>
<li><a href="//newcar.xcar.com.cn/390/" target="_blank" title="GS300">GS300</a></li>
<li><a href="//newcar.xcar.com.cn/1260/" target="_blank" title="国产东风起亚K5">国产东风起亚K5</a></li>
<li><a href="//newcar.xcar.com.cn/3099/" target="_blank" title="GLC级奔驰">GLC级奔驰</a></li>
<li><a href="//newcar.xcar.com.cn/561/" target="_blank" title="广州本田CITY锋范">广州本田CITY锋范</a></li>
<li><a href="//newcar.xcar.com.cn/43/" target="_blank" title="Golf R">Golf R</a></li>
<li><a href="//newcar.xcar.com.cn/2547/" target="_blank" title="国产A3">国产A3</a></li>
<li><a href="//newcar.xcar.com.cn/1768/" target="_blank" title="广汽三菱劲炫 ">广汽三菱劲炫 </a></li>
<li><a href="//newcar.xcar.com.cn/1472/" target="_blank" title="GL8">GL8</a></li>
<li><a href="//newcar.xcar.com.cn/1462/" target="_blank" title="G65AMG">G65AMG</a></li>
<li><a href="//newcar.xcar.com.cn/2763/" target="_blank" title="国产锐界">国产锐界</a></li>
<li><a href="//newcar.xcar.com.cn/2581/" target="_blank" title="广本缤智">广本缤智</a></li>
</ul>
<ul do="ic_show_ps_content" style="display:none;" >
<li><a href="//newcar.xcar.com.cn/3183/" target="_blank" title="海马E3">海马E3</a></li>
<li><a href="//newcar.xcar.com.cn/2800/" target="_blank" title="和悦S20">和悦S20</a></li>
<li><a href="//newcar.xcar.com.cn/1794/" target="_blank" title="海马M3">海马M3</a></li>
<li><a href="//newcar.xcar.com.cn/1175/" target="_blank" title="H8HAVAL ">H8HAVAL </a></li>
<li><a href="//newcar.xcar.com.cn/3155/" target="_blank" title="幻速H3F">幻速H3F</a></li>
<li><a href="//newcar.xcar.com.cn/2736/" target="_blank" title="H6V海格">H6V海格</a></li>
<li><a href="//newcar.xcar.com.cn/677/" target="_blank" title="HIGHLANDER汉兰达">HIGHLANDER汉兰达</a></li>
<li><a href="//newcar.xcar.com.cn/2616/" target="_blank" title="黄海汽车N1">黄海汽车N1</a></li>
<li><a href="//newcar.xcar.com.cn/2286/" target="_blank" title="HUAYRADINASTIA">HUAYRADINASTIA</a></li>
<li><a href="//newcar.xcar.com.cn/2999/" target="_blank" title="幻速H3微型车">幻速H3微型车</a></li>
<li><a href="//newcar.xcar.com.cn/1607/" target="_blank" title="混动版奔驰S级">混动版奔驰S级</a></li>
<li><a href="//newcar.xcar.com.cn/3412/" target="_blank" title="汉腾X5">汉腾X5</a></li>
<li><a href="//newcar.xcar.com.cn/4020/" target="_blank" title="红旗E-HS3">红旗E-HS3</a></li>
<li><a href="//newcar.xcar.com.cn/2831/" target="_blank" title="幻速S6">幻速S6</a></li>
<li><a href="//newcar.xcar.com.cn/4021/" target="_blank" title="哈弗F5">哈弗F5</a></li>
<li><a href="//newcar.xcar.com.cn/1934/" target="_blank" title="海南马自达S7">海南马自达S7</a></li>
<li><a href="//newcar.xcar.com.cn/2999/" target="_blank" title="幻速H3">幻速H3</a></li>
<li><a href="//newcar.xcar.com.cn/22/" target="_blank" title="华晨宝马523LI">华晨宝马523LI</a></li>
<li><a href="//newcar.xcar.com.cn/1949/" target="_blank" title="H7">H7</a></li>
<li><a href="//newcar.xcar.com.cn/22/" target="_blank" title="华晨528">华晨528</a></li>
</ul>
<ul do="ic_show_ps_content" style="display:none;" >
<li><a href="//newcar.xcar.com.cn/655/" target="_blank" title="INFINITIQX56">INFINITIQX56</a></li>
<li><a href="//newcar.xcar.com.cn/655/" target="_blank" title="INFINITIQX ">INFINITIQX </a></li>
<li><a href="//newcar.xcar.com.cn/3149/" target="_blank" title="IS7伽途">IS7伽途</a></li>
<li><a href="//newcar.xcar.com.cn/2950/" target="_blank" title="iEV230电动">iEV230电动</a></li>
<li><a href="//newcar.xcar.com.cn/4087/" target="_blank" title="i5">i5</a></li>
<li><a href="//newcar.xcar.com.cn/3149/" target="_blank" title="IX7伽途">IX7伽途</a></li>
<li><a href="//newcar.xcar.com.cn/1371/" target="_blank" title="I3">I3</a></li>
<li><a href="//newcar.xcar.com.cn/1094/" target="_blank" title="ix35">ix35</a></li>
<li><a href="//newcar.xcar.com.cn/387/" target="_blank" title="IS雷克萨斯">IS雷克萨斯</a></li>
<li><a href="//newcar.xcar.com.cn/2950/" target="_blank" title="iEV230电动版">iEV230电动版</a></li>
<li><a href="//newcar.xcar.com.cn/2950/" target="_blank" title="iEV230纯电车 ">iEV230纯电车 </a></li>
<li><a href="//newcar.xcar.com.cn/1372/" target="_blank" title="I8进口">I8进口</a></li>
<li><a href="//newcar.xcar.com.cn/2950/" target="_blank" title="iEV230纯电版">iEV230纯电版</a></li>
<li><a href="//newcar.xcar.com.cn/1371/" target="_blank" title="I3电动车">I3电动车</a></li>
<li><a href="//newcar.xcar.com.cn/2511/" target="_blank" title="ix25">ix25</a></li>
<li><a href="//newcar.xcar.com.cn/3149/" target="_blank" title="IS7迦途">IS7迦途</a></li>
<li><a href="//newcar.xcar.com.cn/2950/" target="_blank" title="iEV230纯电动">iEV230纯电动</a></li>
<li><a href="//newcar.xcar.com.cn/4041/" target="_blank" title="INSPIRE">INSPIRE</a></li>
<li><a href="//newcar.xcar.com.cn/3149/" target="_blank" title="IX7">IX7</a></li>
<li><a href="//newcar.xcar.com.cn/3149/" target="_blank" title="IS7">IS7</a></li>
</ul>
<ul do="ic_show_ps_content" style="display:none;" >
<li><a href="//newcar.xcar.com.cn/2/" target="_blank" title="进口奥迪A4">进口奥迪A4</a></li>
<li><a href="//newcar.xcar.com.cn/1220/" target="_blank" title="吉利金刚二代">吉利金刚二代</a></li>
<li><a href="//newcar.xcar.com.cn/353/" target="_blank" title="捷豹XJ">捷豹XJ</a></li>
<li><a href="//newcar.xcar.com.cn/1220/" target="_blank" title="吉利金刚">吉利金刚</a></li>
<li><a href="//newcar.xcar.com.cn/60/" target="_blank" title="捷达春天">捷达春天</a></li>
<li><a href="//newcar.xcar.com.cn/2841/" target="_blank" title="捷豹SUV">捷豹SUV</a></li>
<li><a href="//newcar.xcar.com.cn/2550/" target="_blank" title="吉利汽车GC9">吉利汽车GC9</a></li>
<li><a href="//newcar.xcar.com.cn/1654/" target="_blank" title="进口大捷龙">进口大捷龙</a></li>
<li><a href="//newcar.xcar.com.cn/2841/" target="_blank" title="捷豹F-PACE">捷豹F-PACE</a></li>
<li><a href="//newcar.xcar.com.cn/60/" target="_blank" title="捷达前卫">捷达前卫</a></li>
<li><a href="//newcar.xcar.com.cn/306/" target="_blank" title="JEEP牧马人">JEEP牧马人</a></li>
<li><a href="//newcar.xcar.com.cn/10/" target="_blank" title="进口X5">进口X5</a></li>
<li><a href="//newcar.xcar.com.cn/2736/" target="_blank" title="金龙海格H6V新能源版">金龙海格H6V新能源版</a></li>
<li><a href="//newcar.xcar.com.cn/2835/" target="_blank" title="江铃T7">江铃T7</a></li>
<li><a href="//newcar.xcar.com.cn/1647/" target="_blank" title="佳宝T50轻卡">佳宝T50轻卡</a></li>
<li><a href="//newcar.xcar.com.cn/1220/" target="_blank" title="吉利汽车金刚 ">吉利汽车金刚 </a></li>
<li><a href="//newcar.xcar.com.cn/2805/" target="_blank" title="江西五十铃MUX">江西五十铃MUX</a></li>
<li><a href="//newcar.xcar.com.cn/1369/" target="_blank" title="进口斯巴鲁XV">进口斯巴鲁XV</a></li>
<li><a href="//newcar.xcar.com.cn/2980/" target="_blank" title="金杯西部牛仔微卡">金杯西部牛仔微卡</a></li>
<li><a href="//newcar.xcar.com.cn/3102/" target="_blank" title="进口PASSATB8">进口PASSATB8</a></li>
</ul>
<ul do="ic_show_ps_content" style="display:none;" >
<li><a href="//newcar.xcar.com.cn/3877/" target="_blank" title="柯米克">柯米克</a></li>
<li><a href="//newcar.xcar.com.cn/1762/" target="_blank" title="凯锐厢货车">凯锐厢货车</a></li>
<li><a href="//newcar.xcar.com.cn/1802/" target="_blank" title="凯美瑞双擎">凯美瑞双擎</a></li>
<li><a href="//newcar.xcar.com.cn/121/" target="_blank" title="凯越汽车">凯越汽车</a></li>
<li><a href="//newcar.xcar.com.cn/2935/" target="_blank" title="卡罗拉双擎油电混合">卡罗拉双擎油电混合</a></li>
<li><a href="//newcar.xcar.com.cn/2135/" target="_blank" title="库罗德">库罗德</a></li>
<li><a href="//newcar.xcar.com.cn/166/" target="_blank" title="凯美瑞第七代">凯美瑞第七代</a></li>
<li><a href="//newcar.xcar.com.cn/121/" target="_blank" title="凯越HRV">凯越HRV</a></li>
<li><a href="//newcar.xcar.com.cn/2019/" target="_blank" title="凯歌商务车">凯歌商务车</a></li>
<li><a href="//newcar.xcar.com.cn/3755/" target="_blank" title="卡威K150GT">卡威K150GT</a></li>
<li><a href="//newcar.xcar.com.cn/1933/" target="_blank" title="科鲁兹掀背版">科鲁兹掀背版</a></li>
<li><a href="//newcar.xcar.com.cn/332/" target="_blank" title="卡宴汽车">卡宴汽车</a></li>
<li><a href="//newcar.xcar.com.cn/1764/" target="_blank" title="凯运卡车">凯运卡车</a></li>
<li><a href="//newcar.xcar.com.cn/2772/" target="_blank" title="KIA KC">KIA KC</a></li>
<li><a href="//newcar.xcar.com.cn/1697/" target="_blank" title="K02">K02</a></li>
<li><a href="//newcar.xcar.com.cn/3131/" target="_blank" title="康迪K17">康迪K17</a></li>
<li><a href="//newcar.xcar.com.cn/730/" target="_blank" title="科迈罗(进口)">科迈罗(进口)</a></li>
<li><a href="//newcar.xcar.com.cn/166/" target="_blank" title="凯美瑞7代">凯美瑞7代</a></li>
<li><a href="//newcar.xcar.com.cn/2525/" target="_blank" title="凯路威商用车 ">凯路威商用车 </a></li>
<li><a href="//newcar.xcar.com.cn/4250/" target="_blank" title="科鲁泽">科鲁泽</a></li>
</ul>
<ul do="ic_show_ps_content" style="display:none;" >
<li><a href="//newcar.xcar.com.cn/283/" target="_blank" title="菱智">菱智</a></li>
<li><a href="//newcar.xcar.com.cn/2731/" target="_blank" title="揽胜极光国产">揽胜极光国产</a></li>
<li><a href="//newcar.xcar.com.cn/2597/" target="_blank" title="猎豹CS10">猎豹CS10</a></li>
<li><a href="//newcar.xcar.com.cn/391/" target="_blank" title="LS">LS</a></li>
<li><a href="//newcar.xcar.com.cn/2586/" target="_blank" title="揽胜运动版油电混合">揽胜运动版油电混合</a></li>
<li><a href="//newcar.xcar.com.cn/2718/" target="_blank" title="雷克萨斯RC">雷克萨斯RC</a></li>
<li><a href="//newcar.xcar.com.cn/2729/" target="_blank" title="乐途微型">乐途微型</a></li>
<li><a href="//newcar.xcar.com.cn/2649/" target="_blank" title="陆风X7汽车">陆风X7汽车</a></li>
<li><a href="//newcar.xcar.com.cn/1827/" target="_blank" title="雷诺CAPTUR ">雷诺CAPTUR </a></li>
<li><a href="//newcar.xcar.com.cn/2940/" target="_blank" title="蓝鸟车">蓝鸟车</a></li>
<li><a href="//newcar.xcar.com.cn/2674/" target="_blank" title="LOMANDO">LOMANDO</a></li>
<li><a href="//newcar.xcar.com.cn/4495/" target="_blank" title="领克02混动">领克02混动</a></li>
<li><a href="//newcar.xcar.com.cn/2564/" target="_blank" title="lexus nx300h ">lexus nx300h </a></li>
<li><a href="//newcar.xcar.com.cn/4070/" target="_blank" title="蓝舰T340">蓝舰T340</a></li>
<li><a href="//newcar.xcar.com.cn/3096/" target="_blank" title="领动">领动</a></li>
<li><a href="//newcar.xcar.com.cn/384/" target="_blank" title="LEXUSRX350">LEXUSRX350</a></li>
<li><a href="//newcar.xcar.com.cn/3830/" target="_blank" title="领克02">领克02</a></li>
<li><a href="//newcar.xcar.com.cn/391/" target="_blank" title="LEXUSLS">LEXUSLS</a></li>
<li><a href="//newcar.xcar.com.cn/1340/" target="_blank" title="楼兰汽车">楼兰汽车</a></li>
<li><a href="//newcar.xcar.com.cn/2936/" target="_blank" title="雷凌双擎新能源">雷凌双擎新能源</a></li>
</ul>
<ul do="ic_show_ps_content" style="display:none;" >
<li><a href="//newcar.xcar.com.cn/1162/" target="_blank" title="玛莎拉蒂GRANCABRIO ">玛莎拉蒂GRANCABRIO </a></li>
<li><a href="//newcar.xcar.com.cn/1162/" target="_blank" title="玛莎拉蒂GC">玛莎拉蒂GC</a></li>
<li><a href="//newcar.xcar.com.cn/336/" target="_blank" title="MINI乡巴佬">MINI乡巴佬</a></li>
<li><a href="//newcar.xcar.com.cn/1263/" target="_blank" title="名爵3系">名爵3系</a></li>
<li><a href="//newcar.xcar.com.cn/1845/" target="_blank" title="梅赛德斯AMGA45">梅赛德斯AMGA45</a></li>
<li><a href="//newcar.xcar.com.cn/336/" target="_blank" title="MINICLUBM">MINICLUBM</a></li>
<li><a href="//newcar.xcar.com.cn/336/" target="_blank" title="迷你SUV">迷你SUV</a></li>
<li><a href="//newcar.xcar.com.cn/306/" target="_blank" title="牧马人">牧马人</a></li>
<li><a href="//newcar.xcar.com.cn/336/" target="_blank" title="迷你CLUBMAN">迷你CLUBMAN</a></li>
<li><a href="//newcar.xcar.com.cn/2887/" target="_blank" title="迈凯伦570S">迈凯伦570S</a></li>
<li><a href="//newcar.xcar.com.cn/1456/" target="_blank" title="M6进口 ">M6进口 </a></li>
<li><a href="//newcar.xcar.com.cn/3093/" target="_blank" title="malibuXL">malibuXL</a></li>
<li><a href="//newcar.xcar.com.cn/2887/" target="_blank" title="迈凯伦570p1">迈凯伦570p1</a></li>
<li><a href="//newcar.xcar.com.cn/1147/" target="_blank" title="慕尚">慕尚</a></li>
<li><a href="//newcar.xcar.com.cn/1460/" target="_blank" title="梅赛德斯奔驰C级AMG">梅赛德斯奔驰C级AMG</a></li>
<li><a href="//newcar.xcar.com.cn/2887/" target="_blank" title="迈凯轮570p1">迈凯轮570p1</a></li>
<li><a href="//newcar.xcar.com.cn/2967/" target="_blank" title="M301英致">M301英致</a></li>
<li><a href="//newcar.xcar.com.cn/2377/" target="_blank" title="m4 ">m4 </a></li>
<li><a href="//newcar.xcar.com.cn/1960/" target="_blank" title="MODEL X">MODEL X</a></li>
<li><a href="//newcar.xcar.com.cn/4088/" target="_blank" title="名爵HS">名爵HS</a></li>
</ul>
<ul do="ic_show_ps_content" style="display:none;" >
<li><a href="//newcar.xcar.com.cn/193/" target="_blank" title="尼桑阳光">尼桑阳光</a></li>
<li><a href="//newcar.xcar.com.cn/199/" target="_blank" title="尼桑骊威">尼桑骊威</a></li>
<li><a href="//newcar.xcar.com.cn/1781/" target="_blank" title="纳智捷S5">纳智捷S5</a></li>
<li><a href="//newcar.xcar.com.cn/382/" target="_blank" title="NAVIGATOR">NAVIGATOR</a></li>
<li><a href="//newcar.xcar.com.cn/2975/" target="_blank" title="N2黄海皮卡 ">N2黄海皮卡 </a></li>
<li><a href="//newcar.xcar.com.cn/56/" target="_blank" title="NEWPOLO">NEWPOLO</a></li>
<li><a href="//newcar.xcar.com.cn/941/" target="_blank" title="N5">N5</a></li>
<li><a href="//newcar.xcar.com.cn/4239/" target="_blank" title="尼欧II">尼欧II</a></li>
<li><a href="//newcar.xcar.com.cn/189/" target="_blank" title="尼桑天籁">尼桑天籁</a></li>
<li><a href="//newcar.xcar.com.cn/2564/" target="_blank" title="NX">NX</a></li>
<li><a href="//newcar.xcar.com.cn/4091/" target="_blank" title="哪吒N01">哪吒N01</a></li>
<li><a href="//newcar.xcar.com.cn/3098/" target="_blank" title="尼桑西玛">尼桑西玛</a></li>
<li><a href="//newcar.xcar.com.cn/186/" target="_blank" title="NISSAN骐达">NISSAN骐达</a></li>
<li><a href="//newcar.xcar.com.cn/1893/" target="_blank" title="纳智捷大7MPV">纳智捷大7MPV</a></li>
<li><a href="//newcar.xcar.com.cn/1781/" target="_blank" title="纳智捷5">纳智捷5</a></li>
<li><a href="//newcar.xcar.com.cn/1781/" target="_blank" title="纳智捷SEDAN5">纳智捷SEDAN5</a></li>
<li><a href="//newcar.xcar.com.cn/3169/" target="_blank" title="纳智捷 锐3">纳智捷 锐3</a></li>
<li><a href="//newcar.xcar.com.cn/1564/" target="_blank" title="NSX">NSX</a></li>
<li><a href="//newcar.xcar.com.cn/186/" target="_blank" title="尼桑骐达">尼桑骐达</a></li>
<li><a href="//newcar.xcar.com.cn/1340/" target="_blank" title="尼桑楼兰">尼桑楼兰</a></li>
</ul>
<ul do="ic_show_ps_content" style="display:none;" >
<li><a href="//newcar.xcar.com.cn/3021/" target="_blank" title="欧睿纯电动版">欧睿纯电动版</a></li>
<li><a href="//newcar.xcar.com.cn/148/" target="_blank" title="ODYSSEY">ODYSSEY</a></li>
<li><a href="//newcar.xcar.com.cn/3020/" target="_blank" title="欧睿">欧睿</a></li>
<li><a href="//newcar.xcar.com.cn/3021/" target="_blank" title="欧睿商用电动版">欧睿商用电动版</a></li>
<li><a href="//newcar.xcar.com.cn/3317/" target="_blank" title="欧蓝德国产">欧蓝德国产</a></li>
<li><a href="//newcar.xcar.com.cn/2719/" target="_blank" title="OCTAVIA明锐">OCTAVIA明锐</a></li>
<li><a href="//newcar.xcar.com.cn/3021/" target="_blank" title="欧睿纯电动MPV">欧睿纯电动MPV</a></li>
<li><a href="//newcar.xcar.com.cn/3020/" target="_blank" title="欧睿商务车">欧睿商务车</a></li>
<li><a href="//newcar.xcar.com.cn/345/" target="_blank" title="欧陆GT3R">欧陆GT3R</a></li>
<li><a href="//newcar.xcar.com.cn/4420/" target="_blank" title="欧尚长行">欧尚长行</a></li>
<li><a href="//newcar.xcar.com.cn/1406/" target="_blank" title="欧诺">欧诺</a></li>
<li><a href="//newcar.xcar.com.cn/1406/" target="_blank" title="欧诺汽车 ">欧诺汽车 </a></li>
<li><a href="//newcar.xcar.com.cn/4063/" target="_blank" title="欧拉R1">欧拉R1</a></li>
<li><a href="//newcar.xcar.com.cn/4513/" target="_blank" title="欧尚X7">欧尚X7</a></li>
<li><a href="//newcar.xcar.com.cn/3317/" target="_blank" title="OUTLANDER">OUTLANDER</a></li>
<li><a href="//newcar.xcar.com.cn/1406/" target="_blank" title="欧诺商务车">欧诺商务车</a></li>
<li><a href="//newcar.xcar.com.cn/3919/" target="_blank" title="欧拉iQ">欧拉iQ</a></li>
<li><a href="//newcar.xcar.com.cn/3317/" target="_blank" title="欧蓝德">欧蓝德</a></li>
<li><a href="//newcar.xcar.com.cn/3020/" target="_blank" title="欧睿MPV">欧睿MPV</a></li>
<li><a href="//newcar.xcar.com.cn/4258/" target="_blank" title="欧尚A600EV">欧尚A600EV</a></li>
</ul>
<ul do="ic_show_ps_content" style="display:none;" >
<li><a href="//newcar.xcar.com.cn/56/" target="_blank" title="POLO车">POLO车</a></li>
<li><a href="//newcar.xcar.com.cn/2541/" target="_blank" title="PANAMERA混合动力">PANAMERA混合动力</a></li>
<li><a href="//newcar.xcar.com.cn/601/" target="_blank" title="PASSAT">PASSAT</a></li>
<li><a href="//newcar.xcar.com.cn/200/" target="_blank" title="帕杰罗三菱">帕杰罗三菱</a></li>
<li><a href="//newcar.xcar.com.cn/200/" target="_blank" title="帕杰罗V97">帕杰罗V97</a></li>
<li><a href="//newcar.xcar.com.cn/2639/" target="_blank" title="皮卡D-MAX">皮卡D-MAX</a></li>
<li><a href="//newcar.xcar.com.cn/601/" target="_blank" title="帕萨特汽车">帕萨特汽车</a></li>
<li><a href="//newcar.xcar.com.cn/3102/" target="_blank" title="PASSAT蔚揽">PASSAT蔚揽</a></li>
<li><a href="//newcar.xcar.com.cn/2286/" target="_blank" title="帕加尼HUAYRA ">帕加尼HUAYRA </a></li>
<li><a href="//newcar.xcar.com.cn/3102/" target="_blank" title="帕萨特B8进口">帕萨特B8进口</a></li>
<li><a href="//newcar.xcar.com.cn/56/" target="_blank" title="Polo两厢">Polo两厢</a></li>
<li><a href="//newcar.xcar.com.cn/160/" target="_blank" title="普拉多2700国产">普拉多2700国产</a></li>
<li><a href="//newcar.xcar.com.cn/63/" target="_blank" title="帕萨特B6">帕萨特B6</a></li>
<li><a href="//newcar.xcar.com.cn/562/" target="_blank" title="PICASSOC4">PICASSOC4</a></li>
<li><a href="//newcar.xcar.com.cn/601/" target="_blank" title="帕萨特">帕萨特</a></li>
<li><a href="//newcar.xcar.com.cn/2541/" target="_blank" title="帕拉梅拉混合动力">帕拉梅拉混合动力</a></li>
<li><a href="//newcar.xcar.com.cn/200/" target="_blank" title="帕杰罗">帕杰罗</a></li>
<li><a href="//newcar.xcar.com.cn/745/" target="_blank" title="潘娜美拉 ">潘娜美拉 </a></li>
<li><a href="//newcar.xcar.com.cn/2541/" target="_blank" title="帕拉梅拉混动">帕拉梅拉混动</a></li>
<li><a href="//newcar.xcar.com.cn/200/" target="_blank" title="帕杰罗V93">帕杰罗V93</a></li>
</ul>
<ul do="ic_show_ps_content" style="display:none;" >
<li><a href="//newcar.xcar.com.cn/4189/" target="_blank" title="秦Pro DM">秦Pro DM</a></li>
<li><a href="//newcar.xcar.com.cn/404/" target="_blank" title="奇骏汽车">奇骏汽车</a></li>
<li><a href="//newcar.xcar.com.cn/3388/" target="_blank" title="启辰M50V">启辰M50V</a></li>
<li><a href="//newcar.xcar.com.cn/2737/" target="_blank" title="QX50进口">QX50进口</a></li>
<li><a href="//newcar.xcar.com.cn/3869/" target="_blank" title="全界Q1">全界Q1</a></li>
<li><a href="//newcar.xcar.com.cn/2519/" target="_blank" title="q50英菲尼迪">q50英菲尼迪</a></li>
<li><a href="//newcar.xcar.com.cn/404/" target="_blank" title="奇骏X-TRAIL">奇骏X-TRAIL</a></li>
<li><a href="//newcar.xcar.com.cn/2468/" target="_blank" title="启腾M70微型">启腾M70微型</a></li>
<li><a href="//newcar.xcar.com.cn/307/" target="_blank" title="切诺基2500">切诺基2500</a></li>
<li><a href="//newcar.xcar.com.cn/2468/" target="_blank" title="启腾M70">启腾M70</a></li>
<li><a href="//newcar.xcar.com.cn/540/" target="_blank" title="全顺17座">全顺17座</a></li>
<li><a href="//newcar.xcar.com.cn/1946/" target="_blank" title="奇瑞α7">奇瑞α7</a></li>
<li><a href="//newcar.xcar.com.cn/2468/" target="_blank" title="启腾M70小巴 ">启腾M70小巴 </a></li>
<li><a href="//newcar.xcar.com.cn/1481/" target="_blank" title="旗胜">旗胜</a></li>
<li><a href="//newcar.xcar.com.cn/3010/" target="_blank" title="奇瑞路虎发现神行">奇瑞路虎发现神行</a></li>
<li><a href="//newcar.xcar.com.cn/2847/" target="_blank" title="启腾EX80">启腾EX80</a></li>
<li><a href="//newcar.xcar.com.cn/2772/" target="_blank" title="起亚傲跑">起亚傲跑</a></li>
<li><a href="//newcar.xcar.com.cn/1761/" target="_blank" title="全顺经典">全顺经典</a></li>
<li><a href="//newcar.xcar.com.cn/2488/" target="_blank" title="QOROS 3 ">QOROS 3 </a></li>
<li><a href="//newcar.xcar.com.cn/1/" target="_blank" title="Q7">Q7</a></li>
</ul>
<ul do="ic_show_ps_content" style="display:none;" >
<li><a href="//newcar.xcar.com.cn/1627/" target="_blank" title="R008 ">R008 </a></li>
<li><a href="//newcar.xcar.com.cn/2562/" target="_blank" title="瑞风M3商用车">瑞风M3商用车</a></li>
<li><a href="//newcar.xcar.com.cn/3420/" target="_blank" title="瑞风S7">瑞风S7</a></li>
<li><a href="//newcar.xcar.com.cn/2763/" target="_blank" title="锐界">锐界</a></li>
<li><a href="//newcar.xcar.com.cn/2750/" target="_blank" title="荣光V版 ">荣光V版 </a></li>
<li><a href="//newcar.xcar.com.cn/1169/" target="_blank" title="日产NV200">日产NV200</a></li>
<li><a href="//newcar.xcar.com.cn/642/" target="_blank" title="荣放">荣放</a></li>
<li><a href="//newcar.xcar.com.cn/185/" target="_blank" title="日产D22">日产D22</a></li>
<li><a href="//newcar.xcar.com.cn/3228/" target="_blank" title="瑞风M4">瑞风M4</a></li>
<li><a href="//newcar.xcar.com.cn/1625/" target="_blank" title="RS6">RS6</a></li>
<li><a href="//newcar.xcar.com.cn/1549/" target="_blank" title="REATON">REATON</a></li>
<li><a href="//newcar.xcar.com.cn/1553/" target="_blank" title="瑞风S5">瑞风S5</a></li>
<li><a href="//newcar.xcar.com.cn/3243/" target="_blank" title="日产启辰t90">日产启辰t90</a></li>
<li><a href="//newcar.xcar.com.cn/4100/" target="_blank" title="锐骐6">锐骐6</a></li>
<li><a href="//newcar.xcar.com.cn/197/" target="_blank" title="日产锐骐厢式车">日产锐骐厢式车</a></li>
<li><a href="//newcar.xcar.com.cn/1286/" target="_blank" title="瑞风七座商务车">瑞风七座商务车</a></li>
<li><a href="//newcar.xcar.com.cn/2635/" target="_blank" title="锐行名爵">锐行名爵</a></li>
<li><a href="//newcar.xcar.com.cn/2096/" target="_blank" title="荣光皮卡">荣光皮卡</a></li>
<li><a href="//newcar.xcar.com.cn/1103/" target="_blank" title="日产帅客 ">日产帅客 </a></li>
<li><a href="//newcar.xcar.com.cn/642/" target="_blank" title="RAV4国产">RAV4国产</a></li>
</ul>
<ul do="ic_show_ps_content" style="display:none;" >
<li><a href="//newcar.xcar.com.cn/404/" target="_blank" title="SUV奇骏">SUV奇骏</a></li>
<li><a href="//newcar.xcar.com.cn/1759/" target="_blank" title="神骐轻卡">神骐轻卡</a></li>
<li><a href="//newcar.xcar.com.cn/658/" target="_blank" title="上海大众TIGUAN">上海大众TIGUAN</a></li>
<li><a href="//newcar.xcar.com.cn/2966/" target="_blank" title="帅铃">帅铃</a></li>
<li><a href="//newcar.xcar.com.cn/4346/" target="_blank" title="上汽MAXUS D60">上汽MAXUS D60</a></li>
<li><a href="//newcar.xcar.com.cn/2966/" target="_blank" title="帅铃T6">帅铃T6</a></li>
<li><a href="//newcar.xcar.com.cn/3019/" target="_blank" title="绅宝X25">绅宝X25</a></li>
<li><a href="//newcar.xcar.com.cn/1768/" target="_blank" title="三菱劲炫">三菱劲炫</a></li>
<li><a href="//newcar.xcar.com.cn/174/" target="_blank" title="SX4">SX4</a></li>
<li><a href="//newcar.xcar.com.cn/2913/" target="_blank" title="桑塔纳两厢版">桑塔纳两厢版</a></li>
<li><a href="//newcar.xcar.com.cn/52/" target="_blank" title="桑塔纳4000">桑塔纳4000</a></li>
<li><a href="//newcar.xcar.com.cn/2053/" target="_blank" title="上汽MAXUS G10">上汽MAXUS G10</a></li>
<li><a href="//newcar.xcar.com.cn/2053/" target="_blank" title="上汽G10">上汽G10</a></li>
<li><a href="//newcar.xcar.com.cn/3313/" target="_blank" title="SR9众泰">SR9众泰</a></li>
<li><a href="//newcar.xcar.com.cn/2786/" target="_blank" title="上汽大通MAXUS EV80">上汽大通MAXUS EV80</a></li>
<li><a href="//newcar.xcar.com.cn/3282/" target="_blank" title="上汽MAXUS D90">上汽MAXUS D90</a></li>
<li><a href="//newcar.xcar.com.cn/141/" target="_blank" title="赛欧3代">赛欧3代</a></li>
<li><a href="//newcar.xcar.com.cn/1804/" target="_blank" title="上汽大通V80商务">上汽大通V80商务</a></li>
<li><a href="//newcar.xcar.com.cn/1438/" target="_blank" title="S5进口">S5进口</a></li>
<li><a href="//newcar.xcar.com.cn/37/" target="_blank" title="S600">S600</a></li>
</ul>
<ul do="ic_show_ps_content" style="display:none;" >
<li><a href="//newcar.xcar.com.cn/2745/" target="_blank" title="T70">T70</a></li>
<li><a href="//newcar.xcar.com.cn/47/" target="_blank" title="途锐车">途锐车</a></li>
<li><a href="//newcar.xcar.com.cn/2546/" target="_blank" title="天津骏派D60 ">天津骏派D60 </a></li>
<li><a href="//newcar.xcar.com.cn/1962/" target="_blank" title="特斯拉 ">特斯拉 </a></li>
<li><a href="//newcar.xcar.com.cn/4036/" target="_blank" title="唐">唐</a></li>
<li><a href="//newcar.xcar.com.cn/3522/" target="_blank" title="天逸 C5 AIRCROSS">天逸 C5 AIRCROSS</a></li>
<li><a href="//newcar.xcar.com.cn/2948/" target="_blank" title="TUCSON">TUCSON</a></li>
<li><a href="//newcar.xcar.com.cn/2825/" target="_blank" title="添越宾利 ">添越宾利 </a></li>
<li><a href="//newcar.xcar.com.cn/2829/" target="_blank" title="T5江铃">T5江铃</a></li>
<li><a href="//newcar.xcar.com.cn/3889/" target="_blank" title="腾势500">腾势500</a></li>
<li><a href="//newcar.xcar.com.cn/2948/" target="_blank" title="途胜">途胜</a></li>
<li><a href="//newcar.xcar.com.cn/1960/" target="_blank" title="TESLAMODELX ">TESLAMODELX </a></li>
<li><a href="//newcar.xcar.com.cn/2546/" target="_blank" title="天津一汽D60">天津一汽D60</a></li>
<li><a href="//newcar.xcar.com.cn/174/" target="_blank" title="天语SX4">天语SX4</a></li>
<li><a href="//newcar.xcar.com.cn/3522/" target="_blank" title="天逸C5">天逸C5</a></li>
<li><a href="//newcar.xcar.com.cn/3/" target="_blank" title="TT">TT</a></li>
<li><a href="//newcar.xcar.com.cn/2549/" target="_blank" title="唐DM">唐DM</a></li>
<li><a href="//newcar.xcar.com.cn/186/" target="_blank" title="TIDA">TIDA</a></li>
<li><a href="//newcar.xcar.com.cn/3965/" target="_blank" title="途岳">途岳</a></li>
<li><a href="//newcar.xcar.com.cn/3243/" target="_blank" title="T90启辰">T90启辰</a></li>
</ul>
<ul do="ic_show_ps_content" style="display:none;" >
<li><a href="//newcar.xcar.com.cn/1414/" target="_blank" title="V40进口">V40进口</a></li>
<li><a href="//newcar.xcar.com.cn/409/" target="_blank" title="V3">V3</a></li>
<li><a href="//newcar.xcar.com.cn/517/" target="_blank" title="V8 Vantage">V8 Vantage</a></li>
<li><a href="//newcar.xcar.com.cn/4018/" target="_blank" title="vv6">vv6</a></li>
<li><a href="//newcar.xcar.com.cn/2581/" target="_blank" title="VEZEL缤智">VEZEL缤智</a></li>
<li><a href="//newcar.xcar.com.cn/1795/" target="_blank" title="V40CC">V40CC</a></li>
<li><a href="//newcar.xcar.com.cn/2969/" target="_blank" title="V5福田">V5福田</a></li>
<li><a href="//newcar.xcar.com.cn/946/" target="_blank" title="V5PLUS">V5PLUS</a></li>
<li><a href="//newcar.xcar.com.cn/946/" target="_blank" title="V5菱致PLUS">V5菱致PLUS</a></li>
<li><a href="//newcar.xcar.com.cn/48/" target="_blank" title="VOLKSWAGENWERK-BEETLE">VOLKSWAGENWERK-BEETLE</a></li>
<li><a href="//newcar.xcar.com.cn/2752/" target="_blank" title="V60 CROSS COUNTRY">V60 CROSS COUNTRY</a></li>
<li><a href="//newcar.xcar.com.cn/99/" target="_blank" title="VOLVOXC90">VOLVOXC90</a></li>
<li><a href="//newcar.xcar.com.cn/1491/" target="_blank" title="VERNA">VERNA</a></li>
<li><a href="//newcar.xcar.com.cn/1307/" target="_blank" title="V60进口 ">V60进口 </a></li>
<li><a href="//newcar.xcar.com.cn/1307/" target="_blank" title="v60沃尔沃">v60沃尔沃</a></li>
<li><a href="//newcar.xcar.com.cn/1903/" target="_blank" title="V80">V80</a></li>
<li><a href="//newcar.xcar.com.cn/1583/" target="_blank" title="V52">V52</a></li>
<li><a href="//newcar.xcar.com.cn/409/" target="_blank" title="V3菱悦">V3菱悦</a></li>
<li><a href="//newcar.xcar.com.cn/3639/" target="_blank" title="V-class">V-class</a></li>
<li><a href="//newcar.xcar.com.cn/1583/" target="_blank" title="V52面包车">V52面包车</a></li>
</ul>
<ul do="ic_show_ps_content" style="display:none;" >
<li><a href="//newcar.xcar.com.cn/3696/" target="_blank" title="威途Z35">威途Z35</a></li>
<li><a href="//newcar.xcar.com.cn/167/" target="_blank" title="威驰">威驰</a></li>
<li><a href="//newcar.xcar.com.cn/2096/" target="_blank" title="五菱荣小卡">五菱荣小卡</a></li>
<li><a href="//newcar.xcar.com.cn/2750/" target="_blank" title="五菱荣光V版">五菱荣光V版</a></li>
<li><a href="//newcar.xcar.com.cn/2750/" target="_blank" title="五菱荣光V">五菱荣光V</a></li>
<li><a href="//newcar.xcar.com.cn/3850/" target="_blank" title="威马EX5">威马EX5</a></li>
<li><a href="//newcar.xcar.com.cn/3020/" target="_blank" title="潍柴欧睿商用车">潍柴欧睿商用车</a></li>
<li><a href="//newcar.xcar.com.cn/3736/" target="_blank" title="WEY P8">WEY P8</a></li>
<li><a href="//newcar.xcar.com.cn/3428/" target="_blank" title="WEY VV7">WEY VV7</a></li>
<li><a href="//newcar.xcar.com.cn/3102/" target="_blank" title="蔚揽旅行">蔚揽旅行</a></li>
<li><a href="//newcar.xcar.com.cn/4459/" target="_blank" title="沃尔沃XC40国产">沃尔沃XC40国产</a></li>
<li><a href="//newcar.xcar.com.cn/3814/" target="_blank" title="沃尔沃XC60混动">沃尔沃XC60混动</a></li>
<li><a href="//newcar.xcar.com.cn/22/" target="_blank" title="五系加长">五系加长</a></li>
<li><a href="//newcar.xcar.com.cn/1795/" target="_blank" title="沃尔沃V40CC">沃尔沃V40CC</a></li>
<li><a href="//newcar.xcar.com.cn/3437/" target="_blank" title="威驰FS">威驰FS</a></li>
<li><a href="//newcar.xcar.com.cn/3102/" target="_blank" title="蔚揽旅行车">蔚揽旅行车</a></li>
<li><a href="//newcar.xcar.com.cn/2744/" target="_blank" title="沃尔沃XC60">沃尔沃XC60</a></li>
<li><a href="//newcar.xcar.com.cn/3021/" target="_blank" title="潍柴亚星欧睿纯电动商用车">潍柴亚星欧睿纯电动商用车</a></li>
<li><a href="//newcar.xcar.com.cn/2750/" target="_blank" title="五菱V">五菱V</a></li>
<li><a href="//newcar.xcar.com.cn/3021/" target="_blank" title="潍柴欧睿纯电动商务车">潍柴欧睿纯电动商务车</a></li>
</ul>
<ul do="ic_show_ps_content" style="display:none;" >
<li><a href="//newcar.xcar.com.cn/3218/" target="_blank" title="X35">X35</a></li>
<li><a href="//newcar.xcar.com.cn/2731/" target="_blank" title="新款极光">新款极光</a></li>
<li><a href="//newcar.xcar.com.cn/2917/" target="_blank" title="X5油电混合">X5油电混合</a></li>
<li><a href="//newcar.xcar.com.cn/3728/" target="_blank" title="星途TX">星途TX</a></li>
<li><a href="//newcar.xcar.com.cn/1742/" target="_blank" title="小康C37微型车">小康C37微型车</a></li>
<li><a href="//newcar.xcar.com.cn/3866/" target="_blank" title="小鹏G3">小鹏G3</a></li>
<li><a href="//newcar.xcar.com.cn/1730/" target="_blank" title="星旺CL轻客">星旺CL轻客</a></li>
<li><a href="//newcar.xcar.com.cn/3003/" target="_blank" title="小老虎皮卡">小老虎皮卡</a></li>
<li><a href="//newcar.xcar.com.cn/232/" target="_blank" title="现代伊兰特悦动 ">现代伊兰特悦动 </a></li>
<li><a href="//newcar.xcar.com.cn/10/" target="_blank" title="X5">X5</a></li>
<li><a href="//newcar.xcar.com.cn/1778/" target="_blank" title="新圣达">新圣达</a></li>
<li><a href="//newcar.xcar.com.cn/1374/" target="_blank" title="雪佛兰SUV科帕奇">雪佛兰SUV科帕奇</a></li>
<li><a href="//newcar.xcar.com.cn/2349/" target="_blank" title="小海狮X30客车">小海狮X30客车</a></li>
<li><a href="//newcar.xcar.com.cn/3415/" target="_blank" title="新豹MINI">新豹MINI</a></li>
<li><a href="//newcar.xcar.com.cn/1742/" target="_blank" title="小康C37小客车">小康C37小客车</a></li>
<li><a href="//newcar.xcar.com.cn/2914/" target="_blank" title="X5大迈">X5大迈</a></li>
<li><a href="//newcar.xcar.com.cn/3019/" target="_blank" title="X25">X25</a></li>
<li><a href="//newcar.xcar.com.cn/1740/" target="_blank" title="星锐商用车">星锐商用车</a></li>
<li><a href="//newcar.xcar.com.cn/2917/" target="_blank" title="X5新能源版">X5新能源版</a></li>
<li><a href="//newcar.xcar.com.cn/1696/" target="_blank" title="小康K01小卡">小康K01小卡</a></li>
</ul>
<ul do="ic_show_ps_content" style="display:none;" >
<li><a href="//newcar.xcar.com.cn/167/" target="_blank" title="一汽丰田VIOS">一汽丰田VIOS</a></li>
<li><a href="//newcar.xcar.com.cn/2519/" target="_blank" title="英菲尼迪Q50混动版">英菲尼迪Q50混动版</a></li>
<li><a href="//newcar.xcar.com.cn/3596/" target="_blank" title="元EV">元EV</a></li>
<li><a href="//newcar.xcar.com.cn/2853/" target="_blank" title="英菲尼迪QX30">英菲尼迪QX30</a></li>
<li><a href="//newcar.xcar.com.cn/3134/" target="_blank" title="英致727商务车">英致727商务车</a></li>
<li><a href="//newcar.xcar.com.cn/3020/" target="_blank" title="亚星欧睿MPV ">亚星欧睿MPV </a></li>
<li><a href="//newcar.xcar.com.cn/1222/" target="_blank" title="远景汽车">远景汽车</a></li>
<li><a href="//newcar.xcar.com.cn/2423/" target="_blank" title="优6SUV">优6SUV</a></li>
<li><a href="//newcar.xcar.com.cn/1225/" target="_blank" title="悦达起亚智跑">悦达起亚智跑</a></li>
<li><a href="//newcar.xcar.com.cn/2380/" target="_blank" title="YARiS L 致炫">YARiS L 致炫</a></li>
<li><a href="//newcar.xcar.com.cn/2737/" target="_blank" title="英菲尼迪QX50(进口)">英菲尼迪QX50(进口)</a></li>
<li
gitextract_x32qht1_/
├── .gitattributes
├── .gitignore
├── README.md
├── crawler/
│ ├── config/
│ │ └── config.go
│ ├── engine/
│ │ ├── concurrent.go
│ │ ├── simple.go
│ │ ├── types.go
│ │ └── worker.go
│ ├── fetcher/
│ │ └── fetcher.go
│ ├── frontend/
│ │ ├── controller/
│ │ │ └── searchresult.go
│ │ ├── model/
│ │ │ └── page.go
│ │ ├── starter.go
│ │ └── view/
│ │ ├── css/
│ │ │ └── style.css
│ │ ├── index.html
│ │ ├── js/
│ │ │ └── index.js
│ │ ├── searchresult.go
│ │ ├── searchresult_test.go
│ │ └── template.html
│ ├── main.go
│ ├── model/
│ │ ├── car.go
│ │ └── profile.go
│ ├── persist/
│ │ ├── itemsaver.go
│ │ └── itemsaver_test.go
│ ├── scheduler/
│ │ ├── queued.go
│ │ └── simple.go
│ ├── xcar/
│ │ └── parser/
│ │ ├── cardetail.go
│ │ ├── cardetail_test.go
│ │ ├── cardetail_test_data.html
│ │ ├── carlist.go
│ │ ├── carlist_test.go
│ │ ├── carlist_test_data.html
│ │ ├── carmodel.go
│ │ ├── carmodel_test.go
│ │ └── carmodel_test_data.html
│ └── zhenai/
│ └── parser/
│ ├── city.go
│ ├── citylist.go
│ ├── citylist_test.go
│ ├── citylist_test_data.html
│ ├── profile.go
│ ├── profile_test.go
│ └── profile_test_data.html
├── crawler_distributed/
│ ├── config/
│ │ └── config.go
│ ├── main.go
│ ├── persist/
│ │ ├── client/
│ │ │ └── itemsaver.go
│ │ ├── rpc.go
│ │ └── server/
│ │ ├── client_test.go
│ │ └── itemsaver.go
│ ├── rpcsupport/
│ │ └── rpc.go
│ └── worker/
│ ├── client/
│ │ └── worker.go
│ ├── rpc.go
│ ├── server/
│ │ ├── client_test.go
│ │ └── worker.go
│ └── types.go
├── go.mod
├── go.sum
├── lang/
│ ├── basic/
│ │ ├── atomic/
│ │ │ └── atomic.go
│ │ ├── basic/
│ │ │ ├── basic.go
│ │ │ └── triangle_test.go
│ │ ├── branch/
│ │ │ ├── abc.txt
│ │ │ └── branch.go
│ │ ├── func/
│ │ │ └── func.go
│ │ ├── loop/
│ │ │ └── loop.go
│ │ └── regex/
│ │ └── regex.go
│ ├── channel/
│ │ ├── channel.go
│ │ ├── done/
│ │ │ └── done.go
│ │ ├── pattern/
│ │ │ └── main.go
│ │ └── select/
│ │ └── select.go
│ ├── container/
│ │ ├── arrays/
│ │ │ └── arrays.go
│ │ ├── maps/
│ │ │ └── maps.go
│ │ ├── nonrepeatingsubstr/
│ │ │ ├── nonrepeating.go
│ │ │ └── nonrepeating_test.go
│ │ ├── slices/
│ │ │ ├── sliceops.go
│ │ │ └── slices.go
│ │ └── strings/
│ │ └── strings.go
│ ├── errhandling/
│ │ ├── defer/
│ │ │ └── defer.go
│ │ ├── filelistingserver/
│ │ │ ├── errwrapper_test.go
│ │ │ ├── filelisting/
│ │ │ │ └── handler.go
│ │ │ └── web.go
│ │ └── recover/
│ │ └── recover.go
│ ├── functional/
│ │ ├── adder/
│ │ │ └── adder.go
│ │ ├── fib/
│ │ │ └── fib.go
│ │ └── main.go
│ ├── goroutine/
│ │ └── goroutine.go
│ ├── http/
│ │ ├── client.go
│ │ └── gindemo/
│ │ └── ginserver.go
│ ├── json/
│ │ └── main.go
│ ├── maze/
│ │ ├── maze.go
│ │ └── maze.in
│ ├── queue/
│ │ ├── queue.go
│ │ ├── queue_test.go
│ │ └── queueentry/
│ │ └── main.go
│ ├── retriever/
│ │ ├── main.go
│ │ ├── mock/
│ │ │ └── mockretriever.go
│ │ └── real/
│ │ └── retriever.go
│ ├── rpc/
│ │ ├── client/
│ │ │ └── main.go
│ │ ├── rpc.go
│ │ └── server/
│ │ └── main.go
│ └── tree/
│ ├── node.go
│ ├── traversal.go
│ ├── treeentry/
│ │ └── entry.go
│ └── treeentry_embedded/
│ └── entry.go
└── mockserver/
├── config/
│ └── config.go
├── generator/
│ ├── city/
│ │ ├── city.go
│ │ ├── city_test.go
│ │ └── city_tmpl.html
│ ├── citylist/
│ │ ├── citylist.go
│ │ ├── citylist_test.go
│ │ └── citylist_tmpl.html
│ └── profile/
│ ├── profile.go
│ ├── profile_test.go
│ └── profile_tmpl.html
├── main.go
├── recommendation/
│ ├── rcmd.go
│ └── rcmd_test.go
└── static/
├── css/
│ └── blog.css
├── index.html
└── instructions.html
SYMBOL INDEX (293 symbols across 94 files)
FILE: crawler/config/config.go
constant ParseCity (line 5) | ParseCity = "ParseCity"
constant ParseCityList (line 6) | ParseCityList = "ParseCityList"
constant ParseProfile (line 7) | ParseProfile = "ParseProfile"
constant ParseCarDetail (line 9) | ParseCarDetail = "ParseCarDetail"
constant ParseCarList (line 10) | ParseCarList = "ParseCarList"
constant ParseCarModel (line 11) | ParseCarModel = "ParseCarModel"
constant NilParser (line 13) | NilParser = "NilParser"
constant ElasticIndex (line 16) | ElasticIndex = "car_profile"
constant Qps (line 19) | Qps = 2
FILE: crawler/engine/concurrent.go
type ConcurrentEngine (line 3) | type ConcurrentEngine struct
method Run (line 23) | func (e *ConcurrentEngine) Run(seeds ...Request) {
method createWorker (line 56) | func (e *ConcurrentEngine) createWorker(
type Processor (line 10) | type Processor
type Scheduler (line 12) | type Scheduler interface
type ReadyNotifier (line 19) | type ReadyNotifier interface
function isDuplicate (line 75) | func isDuplicate(url string) bool {
FILE: crawler/engine/simple.go
type SimpleEngine (line 7) | type SimpleEngine struct
method Run (line 9) | func (e SimpleEngine) Run(seeds ...Request) {
FILE: crawler/engine/types.go
type ParserFunc (line 5) | type ParserFunc
type Parser (line 8) | type Parser interface
type Request (line 13) | type Request struct
type ParseResult (line 18) | type ParseResult struct
type Item (line 23) | type Item struct
type NilParser (line 30) | type NilParser struct
method Parse (line 32) | func (NilParser) Parse(
method Serialize (line 37) | func (NilParser) Serialize() (
type FuncParser (line 42) | type FuncParser struct
method Parse (line 47) | func (f *FuncParser) Parse(
method Serialize (line 52) | func (f *FuncParser) Serialize() (
function NewFuncParser (line 57) | func NewFuncParser(
FILE: crawler/engine/worker.go
function Worker (line 9) | func Worker(r Request) (ParseResult, error) {
FILE: crawler/fetcher/fetcher.go
function SetVerboseLogging (line 26) | func SetVerboseLogging() {
function Fetch (line 30) | func Fetch(url string) ([]byte, error) {
function determineEncoding (line 54) | func determineEncoding(
FILE: crawler/frontend/controller/searchresult.go
type SearchResultHandler (line 18) | type SearchResultHandler struct
method ServeHTTP (line 38) | func (h SearchResultHandler) ServeHTTP(
method getSearchResult (line 65) | func (h SearchResultHandler) getSearchResult(
function CreateSearchResultHandler (line 23) | func CreateSearchResultHandler(
constant pageSize (line 63) | pageSize = 10
function rewriteQueryString (line 100) | func rewriteQueryString(q string) string {
FILE: crawler/frontend/model/page.go
type SearchResult (line 3) | type SearchResult struct
FILE: crawler/frontend/starter.go
function main (line 9) | func main() {
FILE: crawler/frontend/view/searchresult.go
type SearchResultView (line 10) | type SearchResultView struct
method Render (line 22) | func (s SearchResultView) Render(
function CreateSearchResultView (line 14) | func CreateSearchResultView(
FILE: crawler/frontend/view/searchresult_test.go
function TestSearchResultView_Render (line 12) | func TestSearchResultView_Render(t *testing.T) {
FILE: crawler/main.go
function main (line 11) | func main() {
FILE: crawler/model/car.go
type Car (line 3) | type Car struct
FILE: crawler/model/profile.go
type Profile (line 5) | type Profile struct
function FromJsonObj (line 21) | func FromJsonObj(o interface{}) (Profile, error) {
FILE: crawler/persist/itemsaver.go
function ItemSaver (line 12) | func ItemSaver(
function Save (line 43) | func Save(
FILE: crawler/persist/itemsaver_test.go
function TestSave (line 13) | func TestSave(t *testing.T) {
FILE: crawler/scheduler/queued.go
type QueuedScheduler (line 5) | type QueuedScheduler struct
method WorkerChan (line 10) | func (s *QueuedScheduler) WorkerChan() chan engine.Request {
method Submit (line 14) | func (s *QueuedScheduler) Submit(r engine.Request) {
method WorkerReady (line 18) | func (s *QueuedScheduler) WorkerReady(
method Run (line 23) | func (s *QueuedScheduler) Run() {
FILE: crawler/scheduler/simple.go
type SimpleScheduler (line 5) | type SimpleScheduler struct
method WorkerChan (line 9) | func (s *SimpleScheduler) WorkerChan() chan engine.Request {
method WorkerReady (line 13) | func (s *SimpleScheduler) WorkerReady(chan engine.Request) {
method Run (line 16) | func (s *SimpleScheduler) Run() {
method Submit (line 20) | func (s *SimpleScheduler) Submit(
FILE: crawler/xcar/parser/cardetail.go
function ParseCarDetail (line 25) | func ParseCarDetail(contents []byte, url string) engine.ParseResult {
function extractString (line 62) | func extractString(
function extractFloat (line 73) | func extractFloat(contents []byte, re *regexp.Regexp) float64 {
FILE: crawler/xcar/parser/cardetail_test.go
function TestParseCarDetail (line 11) | func TestParseCarDetail(t *testing.T) {
FILE: crawler/xcar/parser/carlist.go
constant host (line 10) | host = "http://newcar.xcar.com.cn"
function ParseCarList (line 15) | func ParseCarList(
FILE: crawler/xcar/parser/carlist_test.go
function TestParseCarList (line 8) | func TestParseCarList(t *testing.T) {
FILE: crawler/xcar/parser/carmodel.go
function ParseCarModel (line 12) | func ParseCarModel(
FILE: crawler/xcar/parser/carmodel_test.go
function TestParseCarModel (line 8) | func TestParseCarModel(t *testing.T) {
FILE: crawler/zhenai/parser/city.go
function ParseCity (line 17) | func ParseCity(
FILE: crawler/zhenai/parser/citylist.go
constant cityListRe (line 10) | cityListRe = `<a href="(.*www\.zhenai\.com/zhenghun/[0-9a-z]+)"[^>]*>([^...
function ParseCityList (line 12) | func ParseCityList(
FILE: crawler/zhenai/parser/citylist_test.go
function TestParseCityList (line 9) | func TestParseCityList(t *testing.T) {
FILE: crawler/zhenai/parser/profile.go
function parseProfile (line 41) | func parseProfile(
function extractString (line 110) | func extractString(
type ProfileParser (line 121) | type ProfileParser struct
method Parse (line 125) | func (p *ProfileParser) Parse(
method Serialize (line 131) | func (p *ProfileParser) Serialize() (
function NewProfileParser (line 136) | func NewProfileParser(
FILE: crawler/zhenai/parser/profile_test.go
function TestParseProfile (line 11) | func TestParseProfile(t *testing.T) {
FILE: crawler_distributed/config/config.go
constant ItemSaverRpc (line 4) | ItemSaverRpc = "ItemSaverService.Save"
constant CrawlServiceRpc (line 5) | CrawlServiceRpc = "CrawlService.Process"
FILE: crawler_distributed/main.go
function main (line 31) | func main() {
function createClientPool (line 63) | func createClientPool(
FILE: crawler_distributed/persist/client/itemsaver.go
function ItemSaver (line 11) | func ItemSaver(
FILE: crawler_distributed/persist/rpc.go
type ItemSaverService (line 11) | type ItemSaverService struct
method Save (line 16) | func (s *ItemSaverService) Save(
FILE: crawler_distributed/persist/server/client_test.go
function TestItemSaver (line 14) | func TestItemSaver(t *testing.T) {
FILE: crawler_distributed/persist/server/itemsaver.go
function main (line 17) | func main() {
function serveRpc (line 28) | func serveRpc(host, index string) error {
FILE: crawler_distributed/rpcsupport/rpc.go
function ServeRpc (line 10) | func ServeRpc(
function NewClient (line 31) | func NewClient(host string) (*rpc.Client, error) {
FILE: crawler_distributed/worker/client/worker.go
function CreateProcessor (line 11) | func CreateProcessor(
FILE: crawler_distributed/worker/rpc.go
type CrawlService (line 5) | type CrawlService struct
method Process (line 7) | func (CrawlService) Process(
FILE: crawler_distributed/worker/server/client_test.go
function TestCrawlService (line 14) | func TestCrawlService(t *testing.T) {
FILE: crawler_distributed/worker/server/worker.go
function main (line 18) | func main() {
FILE: crawler_distributed/worker/types.go
type SerializedParser (line 15) | type SerializedParser struct
type Request (line 20) | type Request struct
type ParseResult (line 25) | type ParseResult struct
function SerializeRequest (line 30) | func SerializeRequest(r engine.Request) Request {
function SerializeResult (line 41) | func SerializeResult(
function DeserializeRequest (line 54) | func DeserializeRequest(
function DeserializeResult (line 66) | func DeserializeResult(
function deserializeParser (line 85) | func deserializeParser(
FILE: lang/basic/atomic/atomic.go
type atomicInt (line 9) | type atomicInt struct
method increment (line 14) | func (a *atomicInt) increment() {
method get (line 24) | func (a *atomicInt) get() int {
function main (line 31) | func main() {
FILE: lang/basic/basic/basic.go
function variableZeroValue (line 15) | func variableZeroValue() {
function variableInitialValue (line 21) | func variableInitialValue() {
function variableTypeDeduction (line 27) | func variableTypeDeduction() {
function variableShorter (line 32) | func variableShorter() {
function euler (line 38) | func euler() {
function triangle (line 43) | func triangle() {
function calcTriangle (line 48) | func calcTriangle(a, b int) int {
function consts (line 54) | func consts() {
function enums (line 64) | func enums() {
function main (line 86) | func main() {
FILE: lang/basic/basic/triangle_test.go
function TestTriangle (line 5) | func TestTriangle(t *testing.T) {
FILE: lang/basic/branch/branch.go
function grade (line 8) | func grade(score int) string {
function main (line 26) | func main() {
FILE: lang/basic/func/func.go
function eval (line 10) | func eval(a, b int, op string) (int, error) {
function div (line 27) | func div(a, b int) (q, r int) {
function apply (line 31) | func apply(op func(int, int) int, a, b int) int {
function sum (line 40) | func sum(numbers ...int) int {
function swap (line 48) | func swap(a, b int) (int, int) {
function main (line 52) | func main() {
FILE: lang/basic/loop/loop.go
function convertToBin (line 12) | func convertToBin(n int) string {
function printFile (line 21) | func printFile(filename string) {
function printFileContents (line 30) | func printFileContents(reader io.Reader) {
function forever (line 38) | func forever() {
function main (line 44) | func main() {
FILE: lang/basic/regex/regex.go
constant text (line 8) | text = `
function main (line 15) | func main() {
FILE: lang/channel/channel.go
function worker (line 8) | func worker(id int, c chan int) {
function createWorker (line 15) | func createWorker(id int) chan<- int {
function chanDemo (line 21) | func chanDemo() {
function bufferedChannel (line 38) | func bufferedChannel() {
function channelClose (line 48) | func channelClose() {
function main (line 59) | func main() {
FILE: lang/channel/done/done.go
function doWork (line 8) | func doWork(id int,
type worker (line 17) | type worker struct
function createWorker (line 22) | func createWorker(
function chanDemo (line 34) | func chanDemo() {
function main (line 53) | func main() {
FILE: lang/channel/pattern/main.go
function msgGen (line 9) | func msgGen(name string) chan string {
function fanIn (line 22) | func fanIn(chs ...chan string) chan string {
function fanInBySelect (line 34) | func fanInBySelect(c1, c2 chan string) chan string {
function main (line 49) | func main() {
FILE: lang/channel/select/select.go
function generator (line 9) | func generator() chan int {
function worker (line 24) | func worker(id int, c chan int) {
function createWorker (line 32) | func createWorker(id int) chan<- int {
function main (line 38) | func main() {
FILE: lang/container/arrays/arrays.go
function printArray (line 5) | func printArray(arr [5]int) {
function main (line 12) | func main() {
FILE: lang/container/maps/maps.go
function main (line 5) | func main() {
FILE: lang/container/nonrepeatingsubstr/nonrepeating.go
function lengthOfNonRepeatingSubStr (line 7) | func lengthOfNonRepeatingSubStr(s string) int {
function main (line 25) | func main() {
FILE: lang/container/nonrepeatingsubstr/nonrepeating_test.go
function TestSubstr (line 5) | func TestSubstr(t *testing.T) {
function BenchmarkSubstr (line 36) | func BenchmarkSubstr(b *testing.B) {
FILE: lang/container/slices/sliceops.go
function printSlice (line 5) | func printSlice(s []int) {
function sliceOps (line 10) | func sliceOps() {
FILE: lang/container/slices/slices.go
function updateSlice (line 5) | func updateSlice(s []int) {
function main (line 9) | func main() {
FILE: lang/container/strings/strings.go
function main (line 8) | func main() {
FILE: lang/errhandling/defer/defer.go
function tryDefer (line 12) | func tryDefer() {
function writeFile (line 23) | func writeFile(filename string) {
function main (line 49) | func main() {
FILE: lang/errhandling/filelistingserver/errwrapper_test.go
function errPanic (line 14) | func errPanic(_ http.ResponseWriter,
type testingUserError (line 19) | type testingUserError
method Error (line 21) | func (e testingUserError) Error() string {
method Message (line 25) | func (e testingUserError) Message() string {
function errUserError (line 29) | func errUserError(_ http.ResponseWriter,
function errNotFound (line 34) | func errNotFound(_ http.ResponseWriter,
function errNoPermission (line 39) | func errNoPermission(_ http.ResponseWriter,
function errUnknown (line 44) | func errUnknown(_ http.ResponseWriter,
function noError (line 49) | func noError(writer http.ResponseWriter,
function TestErrWrapper (line 68) | func TestErrWrapper(t *testing.T) {
function TestErrWrapperInServer (line 82) | func TestErrWrapperInServer(t *testing.T) {
function verifyResponse (line 94) | func verifyResponse(resp *http.Response,
FILE: lang/errhandling/filelistingserver/filelisting/handler.go
constant prefix (line 11) | prefix = "/list/"
type userError (line 13) | type userError
method Error (line 15) | func (e userError) Error() string {
method Message (line 19) | func (e userError) Message() string {
function HandleFileList (line 23) | func HandleFileList(writer http.ResponseWriter,
FILE: lang/errhandling/filelistingserver/web.go
type appHandler (line 12) | type appHandler
function errWrapper (line 15) | func errWrapper(
type userError (line 61) | type userError interface
function main (line 66) | func main() {
FILE: lang/errhandling/recover/recover.go
function tryRecover (line 7) | func tryRecover() {
function main (line 38) | func main() {
FILE: lang/functional/adder/adder.go
function adder (line 5) | func adder() func(int) int {
type iAdder (line 13) | type iAdder
function adder2 (line 15) | func adder2(base int) iAdder {
function main (line 21) | func main() {
FILE: lang/functional/fib/fib.go
function Fibonacci (line 4) | func Fibonacci() func() int {
FILE: lang/functional/main.go
type intGen (line 12) | type intGen
method Read (line 14) | func (g intGen) Read(
function printFileContents (line 26) | func printFileContents(reader io.Reader) {
function main (line 34) | func main() {
FILE: lang/goroutine/goroutine.go
function main (line 8) | func main() {
FILE: lang/http/client.go
function main (line 9) | func main() {
FILE: lang/http/gindemo/ginserver.go
constant keyRequestId (line 10) | keyRequestId = "requestId"
function main (line 12) | func main() {
FILE: lang/json/main.go
type OrderItem (line 8) | type OrderItem struct
type Order (line 14) | type Order struct
function main (line 20) | func main() {
function marshal (line 24) | func marshal() {
function unmarshal (line 50) | func unmarshal() {
function parseNLP (line 60) | func parseNLP() {
FILE: lang/maze/maze.go
function readMaze (line 8) | func readMaze(filename string) [][]int {
type point (line 28) | type point struct
method add (line 35) | func (p point) add(r point) point {
method at (line 39) | func (p point) at(grid [][]int) (int, bool) {
function walk (line 51) | func walk(maze [][]int,
function main (line 96) | func main() {
FILE: lang/queue/queue.go
type Queue (line 4) | type Queue
method Push (line 9) | func (q *Queue) Push(v int) {
method Pop (line 14) | func (q *Queue) Pop() int {
method IsEmpty (line 21) | func (q *Queue) IsEmpty() bool {
FILE: lang/queue/queue_test.go
function ExampleQueue_Pop (line 5) | func ExampleQueue_Pop() {
FILE: lang/queue/queueentry/main.go
function main (line 9) | func main() {
FILE: lang/retriever/main.go
type Retriever (line 12) | type Retriever interface
type Poster (line 16) | type Poster interface
constant url (line 21) | url = "http://www.imooc.com"
function download (line 23) | func download(r Retriever) string {
function post (line 27) | func post(poster Poster) {
type RetrieverPoster (line 35) | type RetrieverPoster interface
function session (line 40) | func session(s RetrieverPoster) string {
function main (line 47) | func main() {
function inspect (line 73) | func inspect(r Retriever) {
FILE: lang/retriever/mock/mockretriever.go
type Retriever (line 5) | type Retriever struct
method String (line 9) | func (r *Retriever) String() string {
method Post (line 14) | func (r *Retriever) Post(url string,
method Get (line 20) | func (r *Retriever) Get(url string) string {
FILE: lang/retriever/real/retriever.go
type Retriever (line 9) | type Retriever struct
method Get (line 14) | func (r *Retriever) Get(url string) string {
FILE: lang/rpc/client/main.go
function main (line 11) | func main() {
FILE: lang/rpc/rpc.go
type DemoService (line 5) | type DemoService struct
method Div (line 11) | func (DemoService) Div(
type Args (line 7) | type Args struct
FILE: lang/rpc/server/main.go
function main (line 12) | func main() {
FILE: lang/tree/node.go
type Node (line 5) | type Node struct
method Print (line 10) | func (node Node) Print() {
method SetValue (line 14) | func (node *Node) SetValue(value int) {
function CreateNode (line 23) | func CreateNode(value int) *Node {
FILE: lang/tree/traversal.go
method Traverse (line 5) | func (node *Node) Traverse() {
method TraverseFunc (line 12) | func (node *Node) TraverseFunc(f func(*Node)) {
method TraverseWithChannel (line 22) | func (node *Node) TraverseWithChannel() chan *Node {
FILE: lang/tree/treeentry/entry.go
type myTreeNode (line 9) | type myTreeNode struct
method postOrder (line 13) | func (myNode *myTreeNode) postOrder() {
function main (line 26) | func main() {
FILE: lang/tree/treeentry_embedded/entry.go
type myTreeNode (line 9) | type myTreeNode struct
method postOrder (line 13) | func (myNode *myTreeNode) postOrder() {
function main (line 26) | func main() {
FILE: mockserver/generator/city/city.go
type Generator (line 21) | type Generator struct
method HandleRequest (line 37) | func (g *Generator) HandleRequest(c *gin.Context) {
method handleRequest (line 50) | func (g *Generator) handleRequest(c *gin.Context, p params) {
method generate (line 62) | func (g *Generator) generate(p params, w io.Writer) error {
constant itemCount (line 27) | itemCount = 20
constant pageCount (line 28) | pageCount = 5
type params (line 31) | type params struct
function hashCode (line 102) | func hashCode(v interface{}) (int64, error) {
type ContentItem (line 117) | type ContentItem struct
type PageItem (line 124) | type PageItem struct
type Content (line 130) | type Content struct
FILE: mockserver/generator/city/city_test.go
function TestGenerate (line 13) | func TestGenerate(t *testing.T) {
FILE: mockserver/generator/citylist/citylist.go
type Generator (line 15) | type Generator struct
method HandleRequest (line 20) | func (g *Generator) HandleRequest(c *gin.Context) {
method generate (line 32) | func (g *Generator) generate(w io.Writer) error {
FILE: mockserver/generator/citylist/citylist_test.go
function TestGenerate (line 12) | func TestGenerate(t *testing.T) {
FILE: mockserver/generator/profile/profile.go
type Recommendation (line 18) | type Recommendation interface
type Generator (line 23) | type Generator struct
method HandleRequest (line 29) | func (g *Generator) HandleRequest(c *gin.Context) {
method generate (line 68) | func (g *Generator) generate(id int64, w io.Writer) error {
method GenerateProfile (line 88) | func (g *Generator) GenerateProfile(id int64) *PhotoProfile {
type GuessListItem (line 49) | type GuessListItem struct
type PhotoProfile (line 56) | type PhotoProfile struct
type Content (line 63) | type Content struct
function elementFromSlice (line 248) | func elementFromSlice(r *rand.Rand, s []string) string {
FILE: mockserver/generator/profile/profile_test.go
function TestGenerate (line 17) | func TestGenerate(t *testing.T) {
FILE: mockserver/main.go
constant templateSuggestion (line 18) | templateSuggestion = "Please make sure working directory is the root of ...
function main (line 20) | func main() {
FILE: mockserver/recommendation/rcmd.go
constant step (line 10) | step = 5
constant offset (line 11) | offset = -10
constant maxGuess (line 12) | maxGuess = 7
type Client (line 16) | type Client struct
method NextGuess (line 19) | func (Client) NextGuess(id int64) []int64 {
FILE: mockserver/recommendation/rcmd_test.go
function TestNextGuess (line 11) | func TestNextGuess(t *testing.T) {
Condensed preview — 117 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (919K chars).
[
{
"path": ".gitattributes",
"chars": 81,
"preview": "*.html linguist-language=go\n*.css linguist-language=go\n*.js linguist-language=go\n"
},
{
"path": ".gitignore",
"chars": 0,
"preview": ""
},
{
"path": "README.md",
"chars": 45,
"preview": "Interesting things start from viewing forks.\n"
},
{
"path": "crawler/config/config.go",
"chars": 343,
"preview": "package config\n\nconst (\n\t// Parser names\n\tParseCity = \"ParseCity\"\n\tParseCityList = \"ParseCityList\"\n\tParseProfile = "
},
{
"path": "crawler/engine/concurrent.go",
"chars": 1371,
"preview": "package engine\n\ntype ConcurrentEngine struct {\n\tScheduler Scheduler\n\tWorkerCount int\n\tItemChan chan "
},
{
"path": "crawler/engine/simple.go",
"chars": 482,
"preview": "package engine\n\nimport (\n\t\"log\"\n)\n\ntype SimpleEngine struct{}\n\nfunc (e SimpleEngine) Run(seeds ...Request) {\n\tvar reques"
},
{
"path": "crawler/engine/types.go",
"chars": 1049,
"preview": "package engine\n\nimport \"imooc.com/ccmouse/learngo/crawler/config\"\n\ntype ParserFunc func(\n\tcontents []byte, url string) P"
},
{
"path": "crawler/engine/worker.go",
"chars": 327,
"preview": "package engine\n\nimport (\n\t\"log\"\n\n\t\"imooc.com/ccmouse/learngo/crawler/fetcher\"\n)\n\nfunc Worker(r Request) (ParseResult, er"
},
{
"path": "crawler/fetcher/fetcher.go",
"chars": 1146,
"preview": "package fetcher\n\nimport (\n\t\"bufio\"\n\t\"fmt\"\n\t\"io/ioutil\"\n\t\"net/http\"\n\n\t\"log\"\n\n\t\"time\"\n\n\t\"golang.org/x/net/html/charset\"\n\t\""
},
{
"path": "crawler/frontend/controller/searchresult.go",
"chars": 2048,
"preview": "package controller\n\nimport (\n\t\"context\"\n\t\"net/http\"\n\t\"reflect\"\n\t\"regexp\"\n\t\"strconv\"\n\t\"strings\"\n\n\t\"github.com/olivere/ela"
},
{
"path": "crawler/frontend/model/page.go",
"chars": 143,
"preview": "package model\n\ntype SearchResult struct {\n\tHits int64\n\tStart int\n\tQuery string\n\tPrevFrom int\n\tNextFrom int\n\tIt"
},
{
"path": "crawler/frontend/starter.go",
"chars": 367,
"preview": "package main\n\nimport (\n\t\"net/http\"\n\n\t\"imooc.com/ccmouse/learngo/crawler/frontend/controller\"\n)\n\nfunc main() {\n\thttp.Hand"
},
{
"path": "crawler/frontend/view/css/style.css",
"chars": 22852,
"preview": "/* -- import Roboto Font ---------------------------- */\n@import \"https://fonts.googleapis.com/css?family=Roboto:400,100"
},
{
"path": "crawler/frontend/view/index.html",
"chars": 889,
"preview": "<!DOCTYPE html>\n<html lang=\"en\" >\n\n<head>\n <meta charset=\"UTF-8\">\n <script src=\"https://cdnjs.cloudflare.com/ajax/"
},
{
"path": "crawler/frontend/view/js/index.js",
"chars": 2058,
"preview": "/**\n * Created by Kupletsky Sergey on 05.11.14.\n *\n * Material Design Responsive Table\n * Tested on Win8.1 with browsers"
},
{
"path": "crawler/frontend/view/searchresult.go",
"chars": 444,
"preview": "package view\n\nimport (\n\t\"html/template\"\n\t\"io\"\n\n\t\"imooc.com/ccmouse/learngo/crawler/frontend/model\"\n)\n\ntype SearchResultV"
},
{
"path": "crawler/frontend/view/searchresult_test.go",
"chars": 1054,
"preview": "package view\n\nimport (\n\t\"os\"\n\t\"testing\"\n\n\t\"imooc.com/ccmouse/learngo/crawler/engine\"\n\t\"imooc.com/ccmouse/learngo/crawler"
},
{
"path": "crawler/frontend/view/template.html",
"chars": 3294,
"preview": "<!DOCTYPE html>\n<html lang=\"en\">\n\n<head>\n <meta charset=\"UTF-8\">\n <script src=\"https://cdnjs.cloudflare.com/ajax/l"
},
{
"path": "crawler/main.go",
"chars": 713,
"preview": "package main\n\nimport (\n\t\"imooc.com/ccmouse/learngo/crawler/config\"\n\t\"imooc.com/ccmouse/learngo/crawler/engine\"\n\t\"imooc.c"
},
{
"path": "crawler/model/car.go",
"chars": 256,
"preview": "package model\n\ntype Car struct {\n\tName string\n\tPrice float64\n\tImageURL string\n\tSize string\n\tF"
},
{
"path": "crawler/model/profile.go",
"chars": 501,
"preview": "package model\n\nimport \"encoding/json\"\n\ntype Profile struct {\n\tName string\n\tGender string\n\tAge int\n\tHeig"
},
{
"path": "crawler/persist/itemsaver.go",
"chars": 1021,
"preview": "package persist\n\nimport (\n\t\"context\"\n\t\"errors\"\n\t\"log\"\n\n\t\"github.com/olivere/elastic/v7\"\n\t\"imooc.com/ccmouse/learngo/craw"
},
{
"path": "crawler/persist/itemsaver_test.go",
"chars": 1402,
"preview": "package persist\n\nimport (\n\t\"context\"\n\t\"encoding/json\"\n\t\"testing\"\n\n\t\"github.com/olivere/elastic/v7\"\n\t\"imooc.com/ccmouse/l"
},
{
"path": "crawler/scheduler/queued.go",
"chars": 1090,
"preview": "package scheduler\n\nimport \"imooc.com/ccmouse/learngo/crawler/engine\"\n\ntype QueuedScheduler struct {\n\trequestChan chan en"
},
{
"path": "crawler/scheduler/simple.go",
"chars": 455,
"preview": "package scheduler\n\nimport \"imooc.com/ccmouse/learngo/crawler/engine\"\n\ntype SimpleScheduler struct {\n\tworkerChan chan eng"
},
{
"path": "crawler/xcar/parser/cardetail.go",
"chars": 2308,
"preview": "package parser\n\nimport (\n\t\"fmt\"\n\t\"regexp\"\n\t\"strconv\"\n\n\t\"imooc.com/ccmouse/learngo/crawler/engine\"\n\t\"imooc.com/ccmouse/le"
},
{
"path": "crawler/xcar/parser/cardetail_test.go",
"chars": 1589,
"preview": "package parser\n\nimport (\n\t\"io/ioutil\"\n\t\"testing\"\n\n\t\"imooc.com/ccmouse/learngo/crawler/engine\"\n\t\"imooc.com/ccmouse/learng"
},
{
"path": "crawler/xcar/parser/cardetail_test_data.html",
"chars": 181013,
"preview": "\n<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n <meta charset=\"GB2312\">\n <link rel=\"stylesheet\" type=\"text/css\" href=\"//"
},
{
"path": "crawler/xcar/parser/carlist.go",
"chars": 991,
"preview": "package parser\n\nimport (\n\t\"regexp\"\n\n\t\"imooc.com/ccmouse/learngo/crawler/config\"\n\t\"imooc.com/ccmouse/learngo/crawler/engi"
},
{
"path": "crawler/xcar/parser/carlist_test.go",
"chars": 1172,
"preview": "package parser\n\nimport (\n\t\"io/ioutil\"\n\t\"testing\"\n)\n\nfunc TestParseCarList(t *testing.T) {\n\tcontents, err := ioutil.ReadF"
},
{
"path": "crawler/xcar/parser/carlist_test_data.html",
"chars": 101806,
"preview": "\n<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n <meta charset=\"GB2312\">\n <title>【图】买什么车好_最新上市汽车车型推荐-爱卡汽车网</title>\n <m"
},
{
"path": "crawler/xcar/parser/carmodel.go",
"chars": 588,
"preview": "package parser\n\nimport (\n\t\"regexp\"\n\n\t\"imooc.com/ccmouse/learngo/crawler/config\"\n\t\"imooc.com/ccmouse/learngo/crawler/engi"
},
{
"path": "crawler/xcar/parser/carmodel_test.go",
"chars": 719,
"preview": "package parser\n\nimport (\n\t\"io/ioutil\"\n\t\"testing\"\n)\n\nfunc TestParseCarModel(t *testing.T) {\n\tcontents, err := ioutil.Read"
},
{
"path": "crawler/xcar/parser/carmodel_test_data.html",
"chars": 181224,
"preview": "\n<!DOCTYPE html>\n<html>\n<head>\n <meta charset=\"GB2312\">\n <!--<script src=\"//icon.xcar.com.cn/newcar/borui/borui_ps"
},
{
"path": "crawler/zhenai/parser/city.go",
"chars": 908,
"preview": "package parser\n\nimport (\n\t\"regexp\"\n\n\t\"imooc.com/ccmouse/learngo/crawler/config\"\n\t\"imooc.com/ccmouse/learngo/crawler/engi"
},
{
"path": "crawler/zhenai/parser/citylist.go",
"chars": 613,
"preview": "package parser\n\nimport (\n\t\"regexp\"\n\n\t\"imooc.com/ccmouse/learngo/crawler/config\"\n\t\"imooc.com/ccmouse/learngo/crawler/engi"
},
{
"path": "crawler/zhenai/parser/citylist_test.go",
"chars": 735,
"preview": "package parser\n\nimport (\n\t\"testing\"\n\n\t\"io/ioutil\"\n)\n\nfunc TestParseCityList(t *testing.T) {\n\tcontents, err := ioutil.Rea"
},
{
"path": "crawler/zhenai/parser/citylist_test_data.html",
"chars": 60864,
"preview": "<!DOCTYPE HTML>\n<html lang=\"zh\">\n<head>\n<meta charset=\"gbk\" />\n\n<!-- 手机端seo适配 -->\n<meta name=\"mobile-agent\" content=\"fo"
},
{
"path": "crawler/zhenai/parser/profile.go",
"chars": 3511,
"preview": "package parser\n\nimport (\n\t\"regexp\"\n\t\"strconv\"\n\n\t\"imooc.com/ccmouse/learngo/crawler/config\"\n\t\"imooc.com/ccmouse/learngo/c"
},
{
"path": "crawler/zhenai/parser/profile_test.go",
"chars": 1024,
"preview": "package parser\n\nimport (\n\t\"io/ioutil\"\n\t\"testing\"\n\n\t\"imooc.com/ccmouse/learngo/crawler/engine\"\n\t\"imooc.com/ccmouse/learng"
},
{
"path": "crawler/zhenai/parser/profile_test_data.html",
"chars": 36579,
"preview": "\n\n\n\n\n<!DOCTYPE HTML>\n<html>\n<head>\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=gbk\">\n<meta name=\"keyword"
},
{
"path": "crawler_distributed/config/config.go",
"chars": 111,
"preview": "package config\n\nconst (\n\tItemSaverRpc = \"ItemSaverService.Save\"\n\tCrawlServiceRpc = \"CrawlService.Process\"\n)\n"
},
{
"path": "crawler_distributed/main.go",
"chars": 1803,
"preview": "package main\n\nimport (\n\t\"errors\"\n\t\"net/rpc\"\n\n\t\"log\"\n\n\t\"flag\"\n\n\t\"strings\"\n\n\t\"imooc.com/ccmouse/learngo/crawler/config\"\n\t\""
},
{
"path": "crawler_distributed/persist/client/itemsaver.go",
"chars": 754,
"preview": "package client\n\nimport (\n\t\"log\"\n\n\t\"imooc.com/ccmouse/learngo/crawler/engine\"\n\t\"imooc.com/ccmouse/learngo/crawler_distrib"
},
{
"path": "crawler_distributed/persist/rpc.go",
"chars": 506,
"preview": "package persist\n\nimport (\n\t\"log\"\n\n\t\"github.com/olivere/elastic/v7\"\n\t\"imooc.com/ccmouse/learngo/crawler/engine\"\n\t\"imooc.c"
},
{
"path": "crawler_distributed/persist/server/client_test.go",
"chars": 1097,
"preview": "package main\n\nimport (\n\t\"testing\"\n\n\t\"time\"\n\n\t\"imooc.com/ccmouse/learngo/crawler/engine\"\n\t\"imooc.com/ccmouse/learngo/craw"
},
{
"path": "crawler_distributed/persist/server/itemsaver.go",
"chars": 724,
"preview": "package main\n\nimport (\n\t\"flag\"\n\t\"fmt\"\n\t\"log\"\n\n\t\"github.com/olivere/elastic/v7\"\n\t\"imooc.com/ccmouse/learngo/crawler/confi"
},
{
"path": "crawler_distributed/rpcsupport/rpc.go",
"chars": 585,
"preview": "package rpcsupport\n\nimport (\n\t\"log\"\n\t\"net\"\n\t\"net/rpc\"\n\t\"net/rpc/jsonrpc\"\n)\n\nfunc ServeRpc(\n\thost string, service interfa"
},
{
"path": "crawler_distributed/worker/client/worker.go",
"chars": 605,
"preview": "package client\n\nimport (\n\t\"net/rpc\"\n\n\t\"imooc.com/ccmouse/learngo/crawler/engine\"\n\t\"imooc.com/ccmouse/learngo/crawler_dis"
},
{
"path": "crawler_distributed/worker/rpc.go",
"chars": 380,
"preview": "package worker\n\nimport \"imooc.com/ccmouse/learngo/crawler/engine\"\n\ntype CrawlService struct{}\n\nfunc (CrawlService) Proce"
},
{
"path": "crawler_distributed/worker/server/client_test.go",
"chars": 935,
"preview": "package main\n\nimport (\n\t\"fmt\"\n\t\"testing\"\n\t\"time\"\n\n\t\"imooc.com/ccmouse/learngo/crawler/config\"\n\trpcnames \"imooc.com/ccmou"
},
{
"path": "crawler_distributed/worker/server/worker.go",
"chars": 489,
"preview": "package main\n\nimport (\n\t\"fmt\"\n\n\t\"log\"\n\n\t\"flag\"\n\n\t\"imooc.com/ccmouse/learngo/crawler/fetcher\"\n\t\"imooc.com/ccmouse/learngo"
},
{
"path": "crawler_distributed/worker/types.go",
"chars": 2432,
"preview": "package worker\n\nimport (\n\t\"errors\"\n\n\t\"fmt\"\n\t\"log\"\n\n\t\"imooc.com/ccmouse/learngo/crawler/config\"\n\t\"imooc.com/ccmouse/learn"
},
{
"path": "go.mod",
"chars": 237,
"preview": "module imooc.com/ccmouse/learngo\n\ngo 1.13\n\nrequire (\n\tgithub.com/gin-gonic/gin v1.9.1\n\tgithub.com/google/go-cmp v0.6.0\n\t"
},
{
"path": "go.sum",
"chars": 27784,
"preview": "cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=\ncloud.google.com/go v0.34.0/go.mod h1"
},
{
"path": "lang/basic/atomic/atomic.go",
"chars": 465,
"preview": "package main\n\nimport (\n\t\"fmt\"\n\t\"sync\"\n\t\"time\"\n)\n\ntype atomicInt struct {\n\tvalue int\n\tlock sync.Mutex\n}\n\nfunc (a *atomic"
},
{
"path": "lang/basic/basic/basic.go",
"chars": 1266,
"preview": "package main\n\nimport (\n\t\"fmt\"\n\t\"math\"\n\t\"math/cmplx\"\n)\n\nvar (\n\taa = 3\n\tss = \"kkk\"\n\tbb = true\n)\n\nfunc variableZeroValue() "
},
{
"path": "lang/basic/basic/triangle_test.go",
"chars": 379,
"preview": "package main\n\nimport \"testing\"\n\nfunc TestTriangle(t *testing.T) {\n\ttests := []struct{ a, b, c int }{\n\t\t{3, 4, 5},\n\t\t{5, "
},
{
"path": "lang/basic/branch/abc.txt",
"chars": 24,
"preview": "abcde\n12345\nhello\nagain\n"
},
{
"path": "lang/basic/branch/branch.go",
"chars": 734,
"preview": "package main\n\nimport (\n\t\"fmt\"\n\t\"io/ioutil\"\n)\n\nfunc grade(score int) string {\n\tg := \"\"\n\tswitch {\n\tcase score < 0 || score"
},
{
"path": "lang/basic/func/func.go",
"chars": 1244,
"preview": "package main\n\nimport (\n\t\"fmt\"\n\t\"math\"\n\t\"reflect\"\n\t\"runtime\"\n)\n\nfunc eval(a, b int, op string) (int, error) {\n\tswitch op "
},
{
"path": "lang/basic/loop/loop.go",
"chars": 944,
"preview": "package main\n\nimport (\n\t\"bufio\"\n\t\"fmt\"\n\t\"io\"\n\t\"os\"\n\t\"strconv\"\n\t\"strings\"\n)\n\nfunc convertToBin(n int) string {\n\tresult :="
},
{
"path": "lang/basic/regex/regex.go",
"chars": 357,
"preview": "package main\n\nimport (\n\t\"fmt\"\n\t\"regexp\"\n)\n\nconst text = `\nmy email is ccmouse@gmail.com@abc.com\nemail1 is abc@def.org\nem"
},
{
"path": "lang/channel/channel.go",
"chars": 962,
"preview": "package main\n\nimport (\n\t\"fmt\"\n\t\"time\"\n)\n\nfunc worker(id int, c chan int) {\n\tfor n := range c {\n\t\tfmt.Printf(\"Worker %d r"
},
{
"path": "lang/channel/done/done.go",
"chars": 686,
"preview": "package main\n\nimport (\n\t\"fmt\"\n\t\"sync\"\n)\n\nfunc doWork(id int,\n\tw worker) {\n\tfor n := range w.in {\n\t\tfmt.Printf(\"Worker %d"
},
{
"path": "lang/channel/pattern/main.go",
"chars": 815,
"preview": "package main\n\nimport (\n\t\"fmt\"\n\t\"math/rand\"\n\t\"time\"\n)\n\nfunc msgGen(name string) chan string {\n\tc := make(chan string)\n\tgo"
},
{
"path": "lang/channel/select/select.go",
"chars": 1144,
"preview": "package main\n\nimport (\n\t\"fmt\"\n\t\"math/rand\"\n\t\"time\"\n)\n\nfunc generator() chan int {\n\tout := make(chan int)\n\tgo func() {\n\t\t"
},
{
"path": "lang/container/arrays/arrays.go",
"chars": 481,
"preview": "package main\n\nimport \"fmt\"\n\nfunc printArray(arr [5]int) {\n\tarr[0] = 100\n\tfor i, v := range arr {\n\t\tfmt.Println(i, v)\n\t}\n"
},
{
"path": "lang/container/maps/maps.go",
"chars": 829,
"preview": "package main\n\nimport \"fmt\"\n\nfunc main() {\n\tm := map[string]string{\n\t\t\"name\": \"ccmouse\",\n\t\t\"course\": \"golang\",\n\t\t\"sit"
},
{
"path": "lang/container/nonrepeatingsubstr/nonrepeating.go",
"chars": 881,
"preview": "package main\n\nimport (\n\t\"fmt\"\n)\n\nfunc lengthOfNonRepeatingSubStr(s string) int {\n\tlastOccurred := make(map[rune]int)\n\tst"
},
{
"path": "lang/container/nonrepeatingsubstr/nonrepeating_test.go",
"chars": 868,
"preview": "package main\n\nimport \"testing\"\n\nfunc TestSubstr(t *testing.T) {\n\ttests := []struct {\n\t\ts string\n\t\tans int\n\t}{\n\t\t// Nor"
},
{
"path": "lang/container/slices/sliceops.go",
"chars": 794,
"preview": "package main\n\nimport \"fmt\"\n\nfunc printSlice(s []int) {\n\tfmt.Printf(\"%v, len=%d, cap=%d\\n\",\n\t\ts, len(s), cap(s))\n}\n\nfunc "
},
{
"path": "lang/container/slices/slices.go",
"chars": 1182,
"preview": "package main\n\nimport \"fmt\"\n\nfunc updateSlice(s []int) {\n\ts[0] = 100\n}\n\nfunc main() {\n\tarr := [...]int{0, 1, 2, 3, 4, 5, "
},
{
"path": "lang/container/strings/strings.go",
"chars": 558,
"preview": "package main\n\nimport (\n\t\"fmt\"\n\t\"unicode/utf8\"\n)\n\nfunc main() {\n\ts := \"Yes我爱慕课网!\" // UTF-8\n\tfmt.Println(s)\n\n\tfor _, b := "
},
{
"path": "lang/errhandling/defer/defer.go",
"chars": 802,
"preview": "package main\n\nimport (\n\t\"fmt\"\n\t\"os\"\n\n\t\"bufio\"\n\n\t\"imooc.com/ccmouse/learngo/lang/functional/fib\"\n)\n\nfunc tryDefer() {\n\tfo"
},
{
"path": "lang/errhandling/filelistingserver/errwrapper_test.go",
"chars": 2072,
"preview": "package main\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n\t\"io/ioutil\"\n\t\"net/http\"\n\t\"net/http/httptest\"\n\t\"os\"\n\t\"strings\"\n\t\"testing\"\n)\n\nfun"
},
{
"path": "lang/errhandling/filelistingserver/filelisting/handler.go",
"chars": 727,
"preview": "package filelisting\n\nimport (\n\t\"fmt\"\n\t\"io/ioutil\"\n\t\"net/http\"\n\t\"os\"\n\t\"strings\"\n)\n\nconst prefix = \"/list/\"\n\ntype userErro"
},
{
"path": "lang/errhandling/filelistingserver/web.go",
"chars": 1393,
"preview": "package main\n\nimport (\n\t\"log\"\n\t\"net/http\"\n\t_ \"net/http/pprof\"\n\t\"os\"\n\n\t\"imooc.com/ccmouse/learngo/lang/errhandling/fileli"
},
{
"path": "lang/errhandling/recover/recover.go",
"chars": 613,
"preview": "package main\n\nimport (\n\t\"fmt\"\n)\n\nfunc tryRecover() {\n\tdefer func() {\n\t\tr := recover()\n\t\tif r == nil {\n\t\t\tfmt.Println(\"No"
},
{
"path": "lang/functional/adder/adder.go",
"chars": 450,
"preview": "package main\n\nimport \"fmt\"\n\nfunc adder() func(int) int {\n\tsum := 0\n\treturn func(v int) int {\n\t\tsum += v\n\t\treturn sum\n\t}\n"
},
{
"path": "lang/functional/fib/fib.go",
"chars": 139,
"preview": "package fib\n\n// 1, 1, 2, 3, 5, 8, 13, ...\nfunc Fibonacci() func() int {\n\ta, b := 0, 1\n\treturn func() int {\n\t\ta, b = b, a"
},
{
"path": "lang/functional/main.go",
"chars": 562,
"preview": "package main\n\nimport (\n\t\"bufio\"\n\t\"fmt\"\n\t\"io\"\n\t\"strings\"\n\n\t\"imooc.com/ccmouse/learngo/lang/functional/fib\"\n)\n\ntype intGen"
},
{
"path": "lang/goroutine/goroutine.go",
"chars": 210,
"preview": "package main\n\nimport (\n\t\"fmt\"\n\t\"time\"\n)\n\nfunc main() {\n\tfor i := 0; i < 1000; i++ {\n\t\tgo func(i int) {\n\t\t\tfor {\n\t\t\t\tfmt."
},
{
"path": "lang/http/client.go",
"chars": 699,
"preview": "package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"net/http/httputil\"\n)\n\nfunc main() {\n\trequest, err := http.NewRequest(\n\t\thttp"
},
{
"path": "lang/http/gindemo/ginserver.go",
"chars": 795,
"preview": "package main\n\nimport (\n\t\"github.com/gin-gonic/gin\"\n\t\"go.uber.org/zap\"\n\t\"math/rand\"\n\t\"time\"\n)\n\nconst keyRequestId = \"requ"
},
{
"path": "lang/json/main.go",
"chars": 1545,
"preview": "package main\n\nimport (\n\t\"encoding/json\"\n\t\"fmt\"\n)\n\ntype OrderItem struct {\n\tID string `json:\"id\"`\n\tName string `jso"
},
{
"path": "lang/maze/maze.go",
"chars": 1626,
"preview": "package main\n\nimport (\n\t\"fmt\"\n\t\"os\"\n)\n\nfunc readMaze(filename string) [][]int {\n\tfile, err := os.Open(filename)\n\tif err "
},
{
"path": "lang/maze/maze.in",
"chars": 64,
"preview": "6 5\n0 1 0 0 0\n0 0 0 1 0\n0 1 0 1 0\n1 1 1 0 0\n0 1 0 0 1\n0 1 0 0 0\n"
},
{
"path": "lang/queue/queue.go",
"chars": 364,
"preview": "package queue\n\n// A FIFO queue.\ntype Queue []int\n\n// Pushes the element into the queue.\n//\n//\te.g. q.Push(123)\nfunc (q *"
},
{
"path": "lang/queue/queue_test.go",
"chars": 263,
"preview": "package queue\n\nimport \"fmt\"\n\nfunc ExampleQueue_Pop() {\n\tq := Queue{1}\n\tq.Push(2)\n\tq.Push(3)\n\tfmt.Println(q.Pop())\n\tfmt.P"
},
{
"path": "lang/queue/queueentry/main.go",
"chars": 252,
"preview": "package main\n\nimport (\n\t\"fmt\"\n\n\t\"imooc.com/ccmouse/learngo/lang/queue\"\n)\n\nfunc main() {\n\tq := queue.Queue{1}\n\n\tq.Push(2)"
},
{
"path": "lang/retriever/main.go",
"chars": 1474,
"preview": "package main\n\nimport (\n\t\"fmt\"\n\n\t\"time\"\n\n\t\"imooc.com/ccmouse/learngo/lang/retriever/mock\"\n\t\"imooc.com/ccmouse/learngo/lan"
},
{
"path": "lang/retriever/mock/mockretriever.go",
"chars": 360,
"preview": "package mock\n\nimport \"fmt\"\n\ntype Retriever struct {\n\tContents string\n}\n\nfunc (r *Retriever) String() string {\n\treturn fm"
},
{
"path": "lang/retriever/real/retriever.go",
"chars": 377,
"preview": "package real\n\nimport (\n\t\"net/http\"\n\t\"net/http/httputil\"\n\t\"time\"\n)\n\ntype Retriever struct {\n\tUserAgent string\n\tTimeOut "
},
{
"path": "lang/rpc/client/main.go",
"chars": 526,
"preview": "package main\n\nimport (\n\t\"fmt\"\n\t\"net\"\n\t\"net/rpc/jsonrpc\"\n\n\t\"imooc.com/ccmouse/learngo/lang/rpc\"\n)\n\nfunc main() {\n\tconn, e"
},
{
"path": "lang/rpc/rpc.go",
"chars": 275,
"preview": "package rpcdemo\n\nimport \"errors\"\n\ntype DemoService struct{}\n\ntype Args struct {\n\tA, B int\n}\n\nfunc (DemoService) Div(\n\tar"
},
{
"path": "lang/rpc/server/main.go",
"chars": 388,
"preview": "package main\n\nimport (\n\t\"log\"\n\t\"net\"\n\t\"net/rpc\"\n\t\"net/rpc/jsonrpc\"\n\n\t\"imooc.com/ccmouse/learngo/lang/rpc\"\n)\n\nfunc main()"
},
{
"path": "lang/tree/node.go",
"chars": 363,
"preview": "package tree\n\nimport \"fmt\"\n\ntype Node struct {\n\tValue int\n\tLeft, Right *Node\n}\n\nfunc (node Node) Print() {\n\tfmt.Pr"
},
{
"path": "lang/tree/traversal.go",
"chars": 456,
"preview": "package tree\n\nimport \"fmt\"\n\nfunc (node *Node) Traverse() {\n\tnode.TraverseFunc(func(n *Node) {\n\t\tn.Print()\n\t})\n\tfmt.Print"
},
{
"path": "lang/tree/treeentry/entry.go",
"chars": 1053,
"preview": "package main\n\nimport (\n\t\"fmt\"\n\n\t\"imooc.com/ccmouse/learngo/lang/tree\"\n)\n\ntype myTreeNode struct {\n\tnode *tree.Node\n}\n\nfu"
},
{
"path": "lang/tree/treeentry_embedded/entry.go",
"chars": 700,
"preview": "package main\n\nimport (\n\t\"fmt\"\n\n\t\"imooc.com/ccmouse/learngo/lang/tree\"\n)\n\ntype myTreeNode struct {\n\t*tree.Node // Embeddi"
},
{
"path": "mockserver/config/config.go",
"chars": 413,
"preview": "package config\n\nvar (\n\t// ServerAddress configures the server prefix in url generations.\n\t// 一般来说,我们网页中对其它网页的链接只需使用相对路径即"
},
{
"path": "mockserver/generator/city/city.go",
"chars": 2768,
"preview": "// Package city implements city generator.\npackage city\n\nimport (\n\t\"bytes\"\n\t\"encoding/gob\"\n\t\"fmt\"\n\t\"hash/fnv\"\n\t\"html/tem"
},
{
"path": "mockserver/generator/city/city_test.go",
"chars": 1756,
"preview": "package city\n\nimport (\n\t\"bytes\"\n\t\"html/template\"\n\t\"testing\"\n\n\t\"imooc.com/ccmouse/learngo/crawler/zhenai/parser\"\n\t\"imooc."
},
{
"path": "mockserver/generator/city/city_tmpl.html",
"chars": 2739,
"preview": "<!DOCTYPE html>\n<html lang=\"en\">\n\n<head>\n <meta charset=\"UTF-8\">\n <title>城市用户列表</title>\n <link rel=\"stylesheet\""
},
{
"path": "mockserver/generator/citylist/citylist.go",
"chars": 768,
"preview": "// Package citylist implements citylist generator.\npackage citylist\n\nimport (\n\t\"html/template\"\n\t\"io\"\n\t\"log\"\n\t\"net/http\"\n"
},
{
"path": "mockserver/generator/citylist/citylist_test.go",
"chars": 1503,
"preview": "package citylist\n\nimport (\n\t\"bytes\"\n\t\"html/template\"\n\t\"testing\"\n\n\t\"imooc.com/ccmouse/learngo/crawler/zhenai/parser\"\n\t\"im"
},
{
"path": "mockserver/generator/citylist/citylist_tmpl.html",
"chars": 44805,
"preview": "<!DOCTYPE HTML>\n<html lang = \"zh\">\n<head>\n\n<!-- 手机端seo适配 -->\n<title>Go语言分布式爬虫测试网站</title>\n<meta name= \"renderer\" conten"
},
{
"path": "mockserver/generator/profile/profile.go",
"chars": 4424,
"preview": "// Package profile implements profile generator.\npackage profile\n\nimport (\n\t\"fmt\"\n\t\"html/template\"\n\t\"io\"\n\t\"log\"\n\t\"math/r"
},
{
"path": "mockserver/generator/profile/profile_test.go",
"chars": 2179,
"preview": "package profile\n\nimport (\n\t\"bytes\"\n\t\"html/template\"\n\t\"math/rand\"\n\t\"testing\"\n\n\t\"github.com/google/go-cmp/cmp\"\n\t\"imooc.com"
},
{
"path": "mockserver/generator/profile/profile_tmpl.html",
"chars": 15133,
"preview": "<!DOCTYPE HTML>\n<html>\n\n<head>\n <meta http-equiv=\"Content-Type\" content=\"text/html\">\n <title>{{.Name}}的资料</title>\n"
},
{
"path": "mockserver/main.go",
"chars": 1934,
"preview": "package main\n\nimport (\n\t\"html/template\"\n\t\"log\"\n\t\"math/rand\"\n\t\"net/http\"\n\t\"time\"\n\n\t\"github.com/gin-gonic/gin\"\n\t\"imooc.com"
},
{
"path": "mockserver/recommendation/rcmd.go",
"chars": 876,
"preview": "// Package recommendation provides a simple implementation mimicing a recommendation system.\npackage recommendation\n\nimp"
},
{
"path": "mockserver/recommendation/rcmd_test.go",
"chars": 767,
"preview": "package recommendation\n\nimport (\n\t\"math\"\n\t\"math/rand\"\n\t\"testing\"\n\n\t\"github.com/google/go-cmp/cmp\"\n)\n\nfunc TestNextGuess("
},
{
"path": "mockserver/static/css/blog.css",
"chars": 29874,
"preview": "/*!\nPure v1.0.1\nCopyright 2013 Yahoo!\nLicensed under the BSD License.\nhttps://github.com/pure-css/pure/blob/master/LICEN"
},
{
"path": "mockserver/static/index.html",
"chars": 880,
"preview": "<!doctype html>\n<html lang=\"en\">\n\n<head>\n <meta charset=\"utf-8\">\n <meta name=\"viewport\" content=\"width=device-widt"
},
{
"path": "mockserver/static/instructions.html",
"chars": 1670,
"preview": "<html>\n\n<body>\n <h1>模拟相亲网站使用方法</h1>\n <p>\n 本模拟相亲网站可针对性响应原本发到第三方网站的请求。<br>\n 原本发送到类似http://www.zhenai.c"
}
]
About this extraction
This page contains the full source code of the icpd/subscribe2clash GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 117 files (784.3 KB), approximately 260.9k tokens, and a symbol index with 293 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.