File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed
Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -31,11 +31,14 @@ bool Apod::FetchImpl( bool first )
3131 auto article = FetchDom ( page );
3232 if ( !article ) return false ;
3333
34- auto title = article->select_node ( " /html/head/title" );
35- m_title = title ? title.node ().text ().as_string () : " APOD" ;
34+ if ( first )
35+ {
36+ auto title = article->select_node ( " /html/head/title" );
37+ m_title = title ? title.node ().text ().as_string () : " APOD" ;
3638
37- auto desc = article->select_node ( " /html/head/meta[@name='description']" );
38- m_description = desc ? desc.node ().attribute ( " content" ).as_string () : " " ;
39+ auto desc = article->select_node ( " /html/head/meta[@name='description']" );
40+ m_description = desc ? desc.node ().attribute ( " content" ).as_string () : " " ;
41+ }
3942
4043 std::string url;
4144 {
You can’t perform that action at this time.
0 commit comments