【发布时间】:2017-04-16 18:07:29
【问题描述】:
当我使用 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)
然后我从 Reddit 收到消息说他们怀疑我是机器人。
Beautiful Soup 有哪些可能的解决方案? (我曾尝试使用 Scrapy 使用它的 Crawlera,但由于我缺乏 python 知识,我无法使用它。)我不介意它是否是付费服务,只要它对初学者来说足够“直观”即可使用。
【问题讨论】:
标签: web-scraping beautifulsoup