84669 person learning
152542 person learning
20005 person learning
5487 person learning
7821 person learning
359900 person learning
3350 person learning
180660 person learning
48569 person learning
18603 person learning
40936 person learning
1549 person learning
1183 person learning
32909 person learning
<a onclick="xxx(1)">xxxx</a>
类似如上这种需要点击一下才会打开一个网页的,这种链接该如何获取呢?除了手工分析参数自己构造请求, selenium 定位模拟点击,还有什么方法么?
光阴似箭催人老,日月如移越少年。
If the js is obfuscated or encrypted and the link cannot be obtained directly from the code, then only simulated clicks can be done.
from bs4 import BeautifulSoup as bs for a_tag in bs(html_body,'html.parser').find_all('a'): print(a_tag['onclick'])
Regular expression extraction
If the js is obfuscated or encrypted and the link cannot be obtained directly from the code, then only simulated clicks can be done.
Regular expression extraction