Giter VIP home page Giter VIP logo

fiven1-rent-scraper's Introduction

fiven1-rent-scraper's People

Contributors

neighborhood999 avatar yuhao-git-star avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

fiven1-rent-scraper's Issues

Can't find import package

  • version: 1.12.4

  • error messages:

# github.com/neighborhood999/fiveN1-rent-scraper
./rent.go:126:9: undefined: pangu.SpacingText

對於 rent.go 中 NewFiveN1 cookie 參數有疑問

您好,我對於 rent.go 的源碼有一點疑問

// NewFiveN1 create a `FiveN1` with default value.
func NewFiveN1(url string) *FiveN1 {
	return &FiveN1{
		queryURL: url,
		RentList: make(map[int][]*HouseInfo),
		client:   &http.Client{},
		cookie: &http.Cookie{
			Name:  "urlJumpIp",
			Value: "1",
		},
	}
}

其中 cookie 的 Value 是不是要跟著參數進來呀,這才是搜索地區的真正參數
比如

// NewFiveN1 create a `FiveN1` with default value.
func NewFiveN1(url string, region int) *FiveN1 {
	return &FiveN1{
		queryURL: url,
		RentList: make(map[int][]*HouseInfo),
		client:   &http.Client{},
		cookie: &http.Cookie{
			Name:  "urlJumpIp",
			Value: strconv.Itoa(region),
		},
	}
}

更多條件參數

HasImg int `url:"hasimg"` // 過濾是否有「房屋照片」 - `0`:否、`1`:是
NotCover int `url:"not_cover"` // 過濾是否為「頂樓加蓋」 - `0`:否、`1`:是
Role int `url:"role"` // 過濾是否為「屋主刊登」 - `0`:否、`1`:是

這裡不使用 int 類型,改用 string,當選擇其中任意條件時,才帶入參數 1,否則為空值。

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.