python - check if url exist at fanfiction.net -
python - check if url exist at fanfiction.net -
i trying find out lastly chapter number of story @ www.fanfiction.net fun. thought since has fixed pattern of url increment chapter number till time gives me url not exist.
to find whether url existed tried out script @ stackoverflow ques
however found out not give response error of > 400 , rather gives message along 200 response. best way identify page exists or not.
here link exists exists , here 1 not exist does not exist
how can ?
edit 1thanks gregschoen worked out. hope right though :)
i checked out values resp.getheader("last-modified", none) , gives date active links , none not.
thanks lot
if head request on urls supplied, last-modified set on valid pages not on invalid pages. easy way key on valid pages, since server not responding proper http code.
python httplib
Comments
Post a Comment