This commit is contained in:
Kovid Goyal 2024-06-27 19:24:09 +05:30
parent ff3ebef5db
commit c6b36f631a
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C
2 changed files with 6 additions and 4 deletions

View File

@ -1,8 +1,8 @@
'''
harpers.org
'''
from calibre.web.feeds.news import BasicNewsRecipe, classes
from calibre import browser
from calibre.web.feeds.news import BasicNewsRecipe, classes
class Harpers(BasicNewsRecipe):

View File

@ -1,7 +1,9 @@
import json, re
import json
import re
from calibre import browser
from calibre.web.feeds.news import BasicNewsRecipe
from calibre.ebooks.BeautifulSoup import BeautifulSoup
from calibre.web.feeds.news import BasicNewsRecipe
def re_html(y):
@ -45,7 +47,7 @@ class tls(BasicNewsRecipe):
'''
def parse_index(self):
# for past edition, change the issue link below
# for past edition, change the issue link below
issue = 'https://www.the-tls.co.uk/issues/current-issue/'
url = 'https://www.the-tls.co.uk/wp-json/tls/v2/contents-page/' + get_id(issue)
raw = self.index_to_soup(url, raw=True)