擅长:python、mysql、java
<p>您试图搜索<code>requests</code>返回的数据中不存在的内容。在</p>
<p>当您选中<code>requests.get(url).text</code>时,您可能会看到类似于:</p>
^{1}$
<p>导致<code>None</code>被赋给变量<code>repo</code>而解释器却抱怨<code>None</code>类型的对象不存在属性{<cd5>}。在</p>
<p>所以基本上,在开始处理之前,你需要确保你有正确的数据。正如KunduK在他的回答中建议的那样,使用<em>硒</em>和<em>ChromeDriver</em>就可以得到数据而不会被阻塞。你可以从<a href="http://chromedriver.chromium.org/" rel="nofollow noreferrer">http://chromedriver.chromium.org/</a>得到ChromeDriver</em></p>