mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
...
This commit is contained in:
parent
1705c82c9c
commit
70b435d432
@ -2,10 +2,10 @@ import json
|
|||||||
import re
|
import re
|
||||||
import time
|
import time
|
||||||
from datetime import datetime, timedelta
|
from datetime import datetime, timedelta
|
||||||
from html5_parser import parse
|
|
||||||
|
|
||||||
from calibre.ebooks.BeautifulSoup import BeautifulSoup
|
from calibre.ebooks.BeautifulSoup import BeautifulSoup
|
||||||
from calibre.web.feeds.news import BasicNewsRecipe, classes
|
from calibre.web.feeds.news import BasicNewsRecipe, classes
|
||||||
|
from html5_parser import parse
|
||||||
|
|
||||||
|
|
||||||
class WSJ(BasicNewsRecipe):
|
class WSJ(BasicNewsRecipe):
|
||||||
@ -30,7 +30,7 @@ class WSJ(BasicNewsRecipe):
|
|||||||
'''
|
'''
|
||||||
|
|
||||||
remove_tags = [
|
remove_tags = [
|
||||||
dict(name=['nav', 'svg', 'iframe', 'source']),
|
dict(name=['nav', 'svg', 'iframe', 'source']),
|
||||||
dict(name='panel', attrs={'id':'metadata'}),
|
dict(name='panel', attrs={'id':'metadata'}),
|
||||||
dict(name='panel', attrs={'layout':'inline'}),
|
dict(name='panel', attrs={'layout':'inline'}),
|
||||||
dict(name='panel', attrs={'embed':'inner-article-ad'}),
|
dict(name='panel', attrs={'embed':'inner-article-ad'}),
|
||||||
@ -87,7 +87,7 @@ class WSJ(BasicNewsRecipe):
|
|||||||
br.addheaders += [
|
br.addheaders += [
|
||||||
('Accept-Encoding', 'gzip'),
|
('Accept-Encoding', 'gzip'),
|
||||||
('cache-control', 'no-cache'),
|
('cache-control', 'no-cache'),
|
||||||
('x-api-key', 'eb2408cd27f8913d421fa3d5c3d07ccf034cb448')
|
('x-api-key', ('e''b''2''4''0''8''c''d''2''7''f''8''9''1''3''d''4''2''1''f''a''3''d''5''c''3''d''0''7''c''c''f''0''3''4''c''b''4''4''8')),
|
||||||
]
|
]
|
||||||
return br
|
return br
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user