Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit e097ee7

Browse files
committed
开源项目dom变更
1 parent 15fd0eb commit e097ee7

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

src/logic/project.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -314,12 +314,11 @@ func (self ProjectLogic) ParseProjectList(pUrl string) error {
314314
}
315315

316316
// 最后面的先入库处理
317-
projectsSelection := doc.Find(".news-list").Children()
317+
projectsSelection := doc.Find("#projectList .list-container").Children()
318318

319319
for i := projectsSelection.Length() - 1; i >= 0; i-- {
320-
321320
contentSelection := goquery.NewDocumentFromNode(projectsSelection.Get(i)).Selection
322-
projectUrl, ok := contentSelection.Find(".box-aw a").First().Attr("href")
321+
projectUrl, ok := contentSelection.Find(".content .header a").First().Attr("href")
323322

324323
if !ok || projectUrl == "" {
325324
logger.Errorln("project url is empty")

template/feed/tag.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@
2020
<td width="48" valign="top" align="center">
2121
{{if .Uid}}
2222
{{$user := index $.users .Uid}}
23-
<a href="/user/{{$user.Username}}"><img src="{{gravatar $user.Avatar $user.Email 48 $.is_https}}" class="avatar"></a>
23+
<a href="/user/{{$user.Username}}"><img src="{{gravatar $user.Avatar $user.Email 48 $.is_https}}" class="avatar" style="width:48px;"></a>
2424
{{else}}
2525
<a href="javascript:">
26-
<img class="noavatar" alt="" src="https://secure.gravatar.com/avatar/3bf6178897766ebadaa830073e87374d?s=48" data-objid="{{.Objid}}" data-objtype="{{.Objtype}}" data-author="{{.Author}}">
26+
<img class="noavatar" alt="" src="https://secure.gravatar.com/avatar/3bf6178897766ebadaa830073e87374d?s=48" data-objid="{{.Objid}}" data-objtype="{{.Objtype}}" data-author="{{.Author}}" style="width:48px;">
2727
</a>
2828
{{end}}
2929
</td>

0 commit comments

Comments
 (0)