MCPcopy Index your code
hub / github.com/pyload/pyload / processSingleURI

Method processSingleURI

module/lib/feedparser.py:2158–2179  ·  view source on GitHub ↗
(sProperty)

Source from the content-addressed store, hash-verified

2156 return sValue or u''
2157
2158 def processSingleURI(sProperty):
2159 sValue = self.getPropertyValue(elmCard, sProperty, self.URI)
2160 if sValue:
2161 sContentType = ''
2162 sEncoding = ''
2163 sValueKey = ''
2164 if sValue.startswith('data:'):
2165 sEncoding = ';ENCODING=b'
2166 sContentType = sValue.split(';')[0].split('/').pop()
2167 sValue = sValue.split(',', 1).pop()
2168 else:
2169 elmValue = self.getPropertyValue(elmCard, sProperty)
2170 if elmValue:
2171 if sProperty != 'url':
2172 sValueKey = ';VALUE=uri'
2173 sContentType = elmValue.get('type', '').strip().split('/').pop().strip()
2174 sContentType = sContentType.upper()
2175 if sContentType == 'OCTET-STREAM':
2176 sContentType = ''
2177 if sContentType:
2178 sContentType = ';TYPE=' + sContentType.upper()
2179 arLines.append(self.vcardFold(sProperty.upper() + sEncoding + sContentType + sValueKey + ':' + sValue))
2180
2181 def processTypeValue(sProperty, arDefaultType, arForceType=None):
2182 arResults = self.getPropertyValue(elmCard, sProperty, bAllowMultiple=1)

Callers

nothing calls this directly

Calls 6

getPropertyValueMethod · 0.95
vcardFoldMethod · 0.95
popMethod · 0.80
splitMethod · 0.80
getMethod · 0.45
appendMethod · 0.45

Tested by

no test coverage detected