mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
...
This commit is contained in:
parent
af6b232bf6
commit
e767a32d39
@ -20,20 +20,18 @@ class Fortune(BasicNewsRecipe):
|
|||||||
|
|
||||||
def get_browser(self):
|
def get_browser(self):
|
||||||
br = BasicNewsRecipe.get_browser(self)
|
br = BasicNewsRecipe.get_browser(self)
|
||||||
br.open('http://money.cnn.com/m/#!login')
|
br.open('http://fortune.com')
|
||||||
br.select_form(name="loginForm")
|
br.select_form(id='sign-in-form')
|
||||||
br['email'] = self.username
|
br['username'] = self.username
|
||||||
br['password'] = self.password
|
br['password'] = self.password
|
||||||
br.submit()
|
br.submit()
|
||||||
return br
|
return br
|
||||||
|
|
||||||
def parse_index(self):
|
def parse_index(self):
|
||||||
articles = []
|
articles = []
|
||||||
soup0 = self.index_to_soup('http://money.cnn.com/magazines/fortune/')
|
|
||||||
|
|
||||||
# Go to the latestissue
|
# Go to the latestissue
|
||||||
soup = self.index_to_soup(soup0.find(
|
soup = self.index_to_soup('http://fortune.com/section/magazine/')
|
||||||
'div', attrs={'class': 'latestissue'}).find('a', href=True)['href'])
|
|
||||||
|
|
||||||
# Find cover & date
|
# Find cover & date
|
||||||
cover_item = soup.find('div', attrs={'id': 'cover-story'})
|
cover_item = soup.find('div', attrs={'id': 'cover-story'})
|
||||||
|
Loading…
x
Reference in New Issue
Block a user