Subversion Repositories basico

Rev

Rev 126 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 126 Rev 130
Line 18... Line 18...
18
18
19
# Default settings for SAP module
19
# Default settings for SAP module
20
LOGIN_PAGE_URL = "https://accounts.sap.com"
20
LOGIN_PAGE_URL = "https://accounts.sap.com"
21
LOGOUT_PAGE_URL = "https://accounts.sap.com/ui/logout"
21
LOGOUT_PAGE_URL = "https://accounts.sap.com/ui/logout"
22
ODATA_NOTE_URL = "https://launchpad.support.sap.com/services/odata/svt/snogwscorr/TrunkSet(SapNotesNumber='%s',Version='0',Language='E')" #$expand=LongText" #?$expand=LongText,RefTo,RefBy"
22
ODATA_NOTE_URL = "https://launchpad.support.sap.com/services/odata/svt/snogwscorr/TrunkSet(SapNotesNumber='%s',Version='0',Language='E')" #$expand=LongText" #?$expand=LongText,RefTo,RefBy"
-
 
23
ODATA_NOTE_URL_LONGTEXT = "view-source:https://launchpad.support.sap.com/services/odata/svt/snogwscorr/TrunkSet(SapNotesNumber='%s',Version='0',Language='E')/LongText"
23
SAP_NOTE_URL = "https://launchpad.support.sap.com/#/notes/%s"
24
SAP_NOTE_URL = "https://launchpad.support.sap.com/#/notes/%s"
24
SAP_NOTE_URL_PDF = "https://launchpad.support.sap.com/services/pdf/notes/%s/E"
25
SAP_NOTE_URL_PDF = "https://launchpad.support.sap.com/services/pdf/notes/%s/E"
25
TIMEOUT = 5
26
TIMEOUT = 5
26
27
27
"""
28
"""
Line 184... Line 185...
184
            #~ self.log.debug(ODATA_NOTE_URL % sapnote)
185
            #~ self.log.debug(ODATA_NOTE_URL % sapnote)
185
            ODATA_NOTE_URL = self.settings.get('SAP', 'ODATA_NOTE_URL')
186
            ODATA_NOTE_URL = self.settings.get('SAP', 'ODATA_NOTE_URL')
186
            browser = driver.load(ODATA_NOTE_URL % sapnote)
187
            browser = driver.load(ODATA_NOTE_URL % sapnote)
187
            time.sleep(10)
188
            time.sleep(10)
188
            content = browser.page_source
189
            content = browser.page_source
-
 
190
            #~ browser = driver.load(ODATA_NOTE_URL_LONGTEXT % sapnote)
-
 
191
            #~ time.sleep(10)
-
 
192
            #~ longtext = browser.page_source
-
 
193
            #~ self.log.debug(longtext)
-
 
194
189
            #~ self.log.debug("\t%3d - SAP Note %s downloaded" % (sapnote, driver.)
195
            #~ self.log.debug("\t%3d - SAP Note %s downloaded" % (sapnote, driver.)
190
            #~ else:
196
            #~ else:
191
            #~ content = ''
197
            #~ content = ''
192
        except Exception as error:
198
        except Exception as error:
193
            #~ self.log.error("\tSAP Note %s coud not be downloaded" % sapnote)
199
            #~ self.log.error("\tSAP Note %s coud not be downloaded" % sapnote)