我在我的Python 2.7目录中保存了mechanize.但是当我输入import mechanizePython shell时,我收到一条错误消息:
Traceback (most recent call last):
File "<pyshell#0>", line 1, in <module>
import mechanize
ImportError: No module named mechanize
Run Code Online (Sandbox Code Playgroud) 我正在使用Python 3.6,而我必须填写表格.不幸的是,机械化不适用于Python 3.您建议什么作为机械化的替代方案?
我是Carnegie Mellon的新生,他在第一个任期内完全迷失了方向.
当我使用Beautiful Soup提出请求时,我被阻止为"僵尸".
import requests
from bs4 import BeautifulSoup
reddit1Link = requests.get("https://www.reddit.com/r/tensorflow/comments/650p49/question_im_a_techy_35_year_old_and_i_think_ai_is/")
reddit1Content =BeautifulSoup(reddit1Link.content,"lxml")
print(reddit1Content)
Run Code Online (Sandbox Code Playgroud)
然后我收到Reddit的消息说他们怀疑我是机器人.
我将衷心感谢您的帮助.
此致
艾萨克李