View Single Post
Old 09-10-2009, 11:28 PM   #720
cix3
Member
cix3 began at the beginning.
 
Posts: 14
Karma: 10
Join Date: Aug 2009
Device: Kindle 2
Quote:
Originally Posted by kovidgoyal View Post
Cant think of one off hand but basically, it's something like this

Code:
def get_article_url(self, article):
   url = ...(from article as before)
   soup = self.index_to_soup(url)
   # do some processing on soup to find the full article link
   a = soup.find(name='a', href=True, text=re.compile(r'Full\s*Article')
   if a is not None:
      return a['href']
   return url
Stick a few print statements in there to debug things

Hmmm... that's beyond my level of expertise. I'm going to have to wait for someone else to recommend a pre-built recipe that I can copy from.

Thanks!
cix3 is offline