Changeset 286
- Timestamp:
- 06/12/09 10:11:11 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
enpraxis.staticsite/trunk/enpraxis/staticsite/utilities/staticsiteutility.py
r284 r286 171 171 for doc_action in doc_actions: 172 172 if doc_action.id in ['skinless', 's5']: 173 action_url = self._findDocActionUrl( portal_url,soup, doc_action.id)173 action_url = self._findDocActionUrl(soup, doc_action.id) 174 174 if action_url: 175 175 writepath = '%s-%s.html' %(path, doc_action.id) 176 176 raw = self._httpget(action_url) 177 177 self._writeFile(writepath, raw) 178 elif doc_action.id in ['rss', 'rss_front']: 179 if doc_action.id == 'rss_front': 180 action_url = self._findDocActionUrl(portal_url, soup, doc_action.id) 178 elif doc_action.id in ['rss']: 179 action_url = self._findDocActionUrl(soup, doc_action.id) 181 180 if action_url: 182 181 writepath = '%s-%s' %(path, doc_action.id) … … 185 184 186 185 187 def _findDocActionUrl(self, portal_url,soup, id):186 def _findDocActionUrl(self, soup, id): 188 187 """ Parse document soup to find a document action """ 189 188 docdivs = soup.body.findAll('div') … … 196 195 if anchor and anchor.has_key('href'): 197 196 action_url = anchor['href'] 198 if action_url.find(portal_url) == -1:199 action_url = '%s/%s' %(portal_url, action_url)200 197 break 201 198 return action_url
Note: See TracChangeset
for help on using the changeset viewer.
