Quote:
Originally Posted by kovidgoyal
yes you can and the comment character is #
|
I tried to change it to:
def get_current_issue(self):
#from urllib2 import urlopen # For some reason mechanize fails
#home = urlopen('http://www.newsweek.com').read()
#soup = self.index_to_soup('http://www.newsweek.com/id/195141')#BeautifulSoup(home)
#img = soup.find('img', alt='Current Magazine')
#if img and img.parent.has_key('href'):
return 'http://www.newsweek.com/id/195141'
But it gives me:
Job: **Fetch news from Newsweek20090504**
**tuple**: ('TypeError', u'find() takes no keyword arguments')
**Traceback**:
Traceback (most recent call last):
File "parallel.py", line 958, in worker
File "parallel.py", line 916, in work
File "C:\Program Files\calibre\library.zip\calibre\ebooks\epub\from _feeds.py", line 66, in main
File "C:\Program Files\calibre\library.zip\calibre\ebooks\epub\from _feeds.py", line 37, in convert
File "calibre\web\feeds\main.pyo", line 152, in run_recipe
File "calibre\web\feeds\news.pyo", line 567, in download
File "calibre\web\feeds\news.pyo", line 691, in build_index
File "c:\docume~1\admini~1\locals~1\temp\calibre_0.5.10 _l6nhsr_recipes\recipe0.py", line 78, in parse_index
TypeError: find() takes no keyword arguments
**Log**:
('TypeError', u'find() takes no keyword arguments')
Traceback (most recent call last):
File "parallel.py", line 958, in worker
File "parallel.py", line 916, in work
File "C:\Program Files\calibre\library.zip\calibre\ebooks\epub\from _feeds.py", line 66, in main
File "C:\Program Files\calibre\library.zip\calibre\ebooks\epub\from _feeds.py", line 37, in convert
File "calibre\web\feeds\main.pyo", line 152, in run_recipe
File "calibre\web\feeds\news.pyo", line 567, in download
File "calibre\web\feeds\news.pyo", line 691, in build_index
File "c:\docume~1\admini~1\locals~1\temp\calibre_0.5.10 _l6nhsr_recipes\recipe0.py", line 78, in parse_index
TypeError: find() takes no keyword arguments
Any ideas?