Skip to content

Commit

Permalink
현재 GitHub 웹 사이트 구조에 맞게 HTML 클래스 이름 업데이트
Browse files Browse the repository at this point in the history
  • Loading branch information
pyrasis committed Sep 3, 2016
1 parent 7faa0e7 commit feeb4bf
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Unit 66/crawler.go
Expand Up @@ -37,7 +37,7 @@ func parseFollowing(doc *html.Node) []string {
f = func(n *html.Node) {
if n.Type == html.ElementNode && n.Data == "img" { // img 태그
for _, a := range n.Attr {
if a.Key == "class" && a.Val == "avatar float-left" { // class가 avatar left인 요소
if a.Key == "class" && a.Val == "avatar float-left" { // class가 avatar float-left인 요소
for _, a := range n.Attr {
if a.Key == "alt" {
fmt.Println(a.Val) // 사용자 이름 출력
Expand Down
2 changes: 1 addition & 1 deletion Unit 66/crawler_interface.go
Expand Up @@ -90,7 +90,7 @@ func (g *GitHubFollowing) Parse(doc *html.Node) <-chan string {
f = func(n *html.Node) {
if n.Type == html.ElementNode && n.Data == "img" {
for _, a := range n.Attr {
if a.Key == "class" && a.Val == "avatar left" { // class가 avatar left인 요소
if a.Key == "class" && a.Val == "avatar float-left" { // class가 avatar float-left인 요소
for _, a := range n.Attr {
if a.Key == "alt" {
// 사용자 이름을 구한 뒤 채널에 보냄
Expand Down
2 changes: 1 addition & 1 deletion Unit 66/crawler_pipeline.go
Expand Up @@ -44,7 +44,7 @@ func parseFollowing(doc *html.Node, urls chan string) <-chan string {
f = func(n *html.Node) {
if n.Type == html.ElementNode && n.Data == "img" { // img 태그
for _, a := range n.Attr {
if a.Key == "class" && a.Val == "avatar left" { // class가 avatar left인 요소
if a.Key == "class" && a.Val == "avatar float-left" { // class가 avatar float-left인 요소
for _, a := range n.Attr {
if a.Key == "alt" {
// 사용자 이름을 구한 뒤 채널에 보냄
Expand Down

0 comments on commit feeb4bf

Please sign in to comment.