| Line 215... |
Line 215... |
| 215 |
</tr></thead>
|
215 |
</tr></thead>
|
| 216 |
<tbody>"""
|
216 |
<tbody>"""
|
| 217 |
for item in exceptionList:
|
217 |
for item in exceptionList:
|
| 218 |
encoding = chardet.detect(item.pageurl)
|
218 |
encoding = chardet.detect(item.pageurl)
|
| 219 |
try:
|
219 |
try:
|
| - |
|
220 |
message+="""<tr>
|
| - |
|
221 |
<td style="text-align:center">"""+(item.identifier)+"""</td>
|
| - |
|
222 |
<td style="text-align:center">"""+(categoryMap.get(item.category))+"""</td>
|
| - |
|
223 |
<td style="text-align:center">"""+str(item.rank)+"""</td>
|
| - |
|
224 |
<td style="text-align:center">"""+str(item.product_name)+"""</td>
|
| - |
|
225 |
<td style="text-align:center">"""+item.color+"""</td>
|
| 220 |
item.pageurl = item.pageurl.decode(encoding.get('encoding'))
|
226 |
<td style="text-align:center">"""+item.desc+"""</td>
|
| - |
|
227 |
<td style="text-align:center">"""+item.pageurl+"""</td>
|
| - |
|
228 |
</tr>"""
|
| 221 |
except:
|
229 |
except:
|
| 222 |
item.pageurl = item.pageurl.decode(encoding.get('latin-1'))
|
- |
|
| 223 |
message+="""<tr>
|
- |
|
| 224 |
<td style="text-align:center">"""+(item.identifier)+"""</td>
|
- |
|
| 225 |
<td style="text-align:center">"""+(categoryMap.get(item.category))+"""</td>
|
- |
|
| 226 |
<td style="text-align:center">"""+str(item.rank)+"""</td>
|
- |
|
| 227 |
<td style="text-align:center">"""+str(item.product_name)+"""</td>
|
- |
|
| 228 |
<td style="text-align:center">"""+item.color+"""</td>
|
- |
|
| 229 |
<td style="text-align:center">"""+item.desc+"""</td>
|
- |
|
| 230 |
<td style="text-align:center">"""+item.pageurl+"""</td>
|
- |
|
| 231 |
</tr>"""
|
230 |
pass
|
| 232 |
message+="""</tbody></table></body></html>"""
|
231 |
message+="""</tbody></table></body></html>"""
|
| 233 |
print message
|
232 |
print message
|
| 234 |
#recipients = ['kshitij.sood@saholic.com']
|
233 |
#recipients = ['kshitij.sood@saholic.com']
|
| 235 |
recipients = ['rajneesh.arora@saholic.com','kshitij.sood@saholic.com','chaitnaya.vats@saholic.com','ritesh.chauhan@saholic.com','khushal.bhatia@saholic.com']
|
234 |
recipients = ['rajneesh.arora@saholic.com','kshitij.sood@saholic.com','chaitnaya.vats@saholic.com','ritesh.chauhan@saholic.com','khushal.bhatia@saholic.com']
|
| 236 |
msg = MIMEMultipart()
|
235 |
msg = MIMEMultipart()
|