10-17-2015, 02:50 AM | #1 |
a toy panda
Posts: 2,567
Karma: 26020474
Join Date: Mar 2014
Location: Onboard the Queen Anne's Revenge
Device: Various Android dvices
|
Needed help
Can anyone tell me what I'm doing wrong here?
I'm trying to add a reciepe for EWN.co.za but seems I'm doing something wrong this is what I did: https://www.dropbox.com/s/9vigluz7ys..._1001.zip?dl=0 |
10-19-2015, 06:36 AM | #2 |
a toy panda
Posts: 2,567
Karma: 26020474
Join Date: Mar 2014
Location: Onboard the Queen Anne's Revenge
Device: Various Android dvices
|
OK. Fixed most of my problems by starting over
Here is what i've done so far. It works, but I'm unable to get rid of a few elements. Code:
class AdvancedUserRecipe1445226821(BasicNewsRecipe): title = u'EWN' oldest_article = 7 max_articles_per_feed = 100 auto_cleanup = True feeds = [(u'Local', u'http://ewn.co.za/RSS%20Feeds/Latest%20News?category=Local'), (u'World', u'http://ewn.co.za/RSS%20Feeds/Latest%20News?category=World'), (u'Sport', u'http://ewn.co.za/RSS%20Feeds/Latest%20News?category=Sport')] remove_tags = [ dict(name='div', attrs={'class':'emailForm'}), dict(name='div', attrs={'class':'byline'}), dict(name='div', attrs={'class':'article-topics'}), dict(name='div', attrs={'class':'comments'}) ] |
Advert | |
|
10-19-2015, 07:51 AM | #3 |
creator of calibre
Posts: 44,359
Karma: 23752080
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
you cant use both auto_cleanup and remove_tags. Set auto_cleanup to False
|
10-19-2015, 10:58 PM | #4 |
a toy panda
Posts: 2,567
Karma: 26020474
Join Date: Mar 2014
Location: Onboard the Queen Anne's Revenge
Device: Various Android dvices
|
Thanx Kovid.
But seems I'm getting this error now. (Think me will give up) Code:
Reading TOC from NCX... Merging user specified metadata... Detecting structure... Flattening CSS and remapping font sizes... Failed to parse CSS selector: u'select::-ms-expand' Traceback (most recent call last): File "site-packages\calibre\ebooks\oeb\stylizer.py", line 106, in build_selector File "site-packages\cssselect-0.7.1-py2.7.egg\cssselect\xpath.py", line 168, in css_to_xpath ExpressionError: Pseudo-elements are not supported. Failed to parse CSS selector: u'.btn-play:before' Traceback (most recent call last): File "site-packages\calibre\ebooks\oeb\stylizer.py", line 106, in build_selector File "site-packages\cssselect-0.7.1-py2.7.egg\cssselect\xpath.py", line 168, in css_to_xpath ExpressionError: Pseudo-elements are not supported. Failed to parse CSS selector: u'.btn-play-lrg:before' Traceback (most recent call last): File "site-packages\calibre\ebooks\oeb\stylizer.py", line 106, in build_selector File "site-packages\cssselect-0.7.1-py2.7.egg\cssselect\xpath.py", line 168, in css_to_xpath ExpressionError: Pseudo-elements are not supported. Failed to parse CSS selector: u'.btn-audio:before' Traceback (most recent call last): File "site-packages\calibre\ebooks\oeb\stylizer.py", line 106, in build_selector File "site-packages\cssselect-0.7.1-py2.7.egg\cssselect\xpath.py", line 168, in css_to_xpath ExpressionError: Pseudo-elements are not supported. Failed to parse CSS selector: u'.btn-audio-lrg:before' Traceback (most recent call last): File "site-packages\calibre\ebooks\oeb\stylizer.py", line 106, in build_selector File "site-packages\cssselect-0.7.1-py2.7.egg\cssselect\xpath.py", line 168, in css_to_xpath ExpressionError: Pseudo-elements are not supported. Failed to parse CSS selector: u'.story-intro .btn-play:before' Traceback (most recent call last): File "site-packages\calibre\ebooks\oeb\stylizer.py", line 106, in build_selector File "site-packages\cssselect-0.7.1-py2.7.egg\cssselect\xpath.py", line 168, in css_to_xpath ExpressionError: Pseudo-elements are not supported. Failed to parse CSS selector: u'.story-intro .btn-play-lrg:before' Traceback (most recent call last): File "site-packages\calibre\ebooks\oeb\stylizer.py", line 106, in build_selector File "site-packages\cssselect-0.7.1-py2.7.egg\cssselect\xpath.py", line 168, in css_to_xpath ExpressionError: Pseudo-elements are not supported. Failed to parse CSS selector: u'.story-intro .btn-audio:before' Traceback (most recent call last): File "site-packages\calibre\ebooks\oeb\stylizer.py", line 106, in build_selector File "site-packages\cssselect-0.7.1-py2.7.egg\cssselect\xpath.py", line 168, in css_to_xpath ExpressionError: Pseudo-elements are not supported. Failed to parse CSS selector: u'.story-intro .btn-audio-lrg:before' Traceback (most recent call last): File "site-packages\calibre\ebooks\oeb\stylizer.py", line 106, in build_selector File "site-packages\cssselect-0.7.1-py2.7.egg\cssselect\xpath.py", line 168, in css_to_xpath ExpressionError: Pseudo-elements are not supported. Failed to parse CSS selector: u'.top-bar .toggle-topbar.menu-icon a:' Traceback (most recent call last): File "site-packages\calibre\ebooks\oeb\stylizer.py", line 106, in build_selector File "site-packages\cssselect-0.7.1-py2.7.egg\cssselect\xpath.py", line 165, in css_to_xpath File "site-packages\cssselect-0.7.1-py2.7.egg\cssselect\parser.py", line 313, in parse File "site-packages\cssselect-0.7.1-py2.7.egg\cssselect\parser.py", line 328, in parse_selector_group File "site-packages\cssselect-0.7.1-py2.7.egg\cssselect\parser.py", line 354, in parse_selector File "site-packages\cssselect-0.7.1-py2.7.egg\cssselect\parser.py", line 402, in parse_simple_selector File "site-packages\cssselect-0.7.1-py2.7.egg\cssselect\parser.py", line 704, in next_ident SelectorSyntaxError: Expected ident, got <EOF at 36> Failed to parse CSS selector: u'.top-bar.expanded .toggle-topbar a:' Traceback (most recent call last): File "site-packages\calibre\ebooks\oeb\stylizer.py", line 106, in build_selector File "site-packages\cssselect-0.7.1-py2.7.egg\cssselect\xpath.py", line 165, in css_to_xpath File "site-packages\cssselect-0.7.1-py2.7.egg\cssselect\parser.py", line 313, in parse File "site-packages\cssselect-0.7.1-py2.7.egg\cssselect\parser.py", line 328, in parse_selector_group File "site-packages\cssselect-0.7.1-py2.7.egg\cssselect\parser.py", line 354, in parse_selector File "site-packages\cssselect-0.7.1-py2.7.egg\cssselect\parser.py", line 402, in parse_simple_selector File "site-packages\cssselect-0.7.1-py2.7.egg\cssselect\parser.py", line 704, in next_ident SelectorSyntaxError: Expected ident, got <EOF at 35> |
10-19-2015, 11:10 PM | #5 |
creator of calibre
Posts: 44,359
Karma: 23752080
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Add
no_stylesheets = True |
Advert | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
help needed please | ImSpartacuS | Reading Recommendations | 6 | 07-06-2012 08:49 PM |
Help needed | lanslort | enTourage eDGe | 2 | 10-28-2011 12:49 AM |
help needed | Debby_r | Introduce Yourself | 5 | 07-14-2009 03:52 PM |
hello to you all! HELP NEEDED PLEASE! | tetleys | Introduce Yourself | 9 | 07-20-2008 04:16 AM |