1.python ç¨ beautifulsoup è·å¾ <div id="z"></div>çä¸è¥¿
python ç¨ beautifulsoup è·å¾ <div id="z"></div>çä¸è¥¿
ä¸ãä½ åå°çè·æµè§å¨ä¸ä¸æ ·ï¼è¿ä¸è¬æ¯å 为å 容æ¯jsçææè js以ajaxåå°ç¶åæ´æ°è¿å»çã
æ³è¦èªå·±å代ç 解å³ææä½ è¦èªå·±åæä¸ä¸ç½é¡µæ带çjsçåè½äºï¼æè æ³å·æçè¯ç¨webbrowserä¹ç±»ç模åéè¿æµè§å¨æ¥åå¾å 容ã
äºãè¦ådivçidå±æ§ç¨BeautifulSoupå³å¯è¾¾å°ç®çï¼è¦æ¯è£ äºPyQueryçå°±æ´ç®åï¼ä¸é¢ç»ä¸ªBeautifulSoupçä¾åï¼
from bs4 import BeautifulSoup
sp = BeautifulSoup('<div id="z"></div>')
assert(sp.div['id'],绝对女神源码研究'z')
print sp.div['id']
2024-11-30 01:00
2024-11-29 23:57
2024-11-29 23:41
2024-11-29 23:28
2024-11-29 22:48
2024-11-29 22:46