This repository was archived by the owner on Jun 11, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +12
-4
lines changed Expand file tree Collapse file tree 1 file changed +12
-4
lines changed Original file line number Diff line number Diff line change 6
6
7
7
from bs4 import BeautifulSoup , Tag
8
8
9
- from .core import SkypeObj , SkypeEnum
9
+ from .core import SkypeObj , SkypeEnum , SkypeApiException
10
10
from .util import SkypeUtils
11
11
from .conn import SkypeConnection
12
12
@@ -593,16 +593,24 @@ def contentToFields(cls, content):
593
593
594
594
@property
595
595
def urlContent (self ):
596
+ return "{0}/views/{1}" .format (self .file .urlFull , self .contentPath ) if self .file else None
597
+
598
+ @property
599
+ def urlContentAsm (self ):
596
600
return "{0}/views/{1}" .format (self .file .urlAsm , self .contentPath ) if self .file else None
597
601
598
602
@property
599
603
@SkypeUtils .cacheResult
600
604
def fileContent (self ):
601
- if self .file :
605
+ if not self .file :
606
+ return None
607
+ try :
602
608
return self .skype .conn ("GET" , self .urlContent ,
603
609
auth = SkypeConnection .Auth .Authorize ).content
604
- else :
605
- return None
610
+ except SkypeApiException :
611
+ # Try retrieving via the patched ASM URL instead.
612
+ return self .skype .conn ("GET" , self .urlContentAsm ,
613
+ auth = SkypeConnection .Auth .Authorize ).content
606
614
607
615
@property
608
616
def html (self ):
You can’t perform that action at this time.
0 commit comments