forked from tanner/qotnews
		
	Fix Tildes down for maintenance edge case
This commit is contained in:
		@@ -67,6 +67,8 @@ def story(ref):
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    soup = BeautifulSoup(html, features='html.parser')
 | 
					    soup = BeautifulSoup(html, features='html.parser')
 | 
				
			||||||
    a = soup.find('article', class_='topic-full')
 | 
					    a = soup.find('article', class_='topic-full')
 | 
				
			||||||
 | 
					    if a is None: return False
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    h = a.find('header')
 | 
					    h = a.find('header')
 | 
				
			||||||
    lu = h.find('a', class_='link-user')
 | 
					    lu = h.find('a', class_='link-user')
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -112,7 +114,7 @@ if __name__ == '__main__':
 | 
				
			|||||||
    #print(self_post)
 | 
					    #print(self_post)
 | 
				
			||||||
    #li_comment = story('gqx')
 | 
					    #li_comment = story('gqx')
 | 
				
			||||||
    #print(li_comment)
 | 
					    #print(li_comment)
 | 
				
			||||||
    broken = story('hsg')
 | 
					    broken = story('ikn')
 | 
				
			||||||
    print(broken)
 | 
					    print(broken)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    # make sure there's no self-reference
 | 
					    # make sure there's no self-reference
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user