如何使用Python 2.7从登录网站进行网络抓取?

时间:2017-06-23 06:19:13

标签: python session login web-scraping beautifulsoup

我想从一个网站进行网页搜索,我必须先登录。 问题是,有一个"机器人保护" (所以我必须验证我不是机器人+重新安检。)

如何登录本网站?

这里是网站代码(谁是竞赛输入):



NSString *title = @"Some Title";
NSString *shareBody =[NSString stringWithFormat:@"%@\nI have rated %@ as %zd/5", self.commentTextView.text, store.name, self.rating];

NSString *storeID = store.ID.description;

FBSDKShareLinkContent *content = [FBSDKShareLinkContent new];
content.contentTitle = title;
content.contentDescription = shareBody;
content.imageURL = [NSURL URLWithString:store.coverImage.medium];
content.placeID = storeID;
content.contentURL = [NSURL URLWithString:[NSString stringWithFormat:@"https://fb.me/ 137144****85103?store=%@", store.ID]];

FBSDKShareDialog* dialog = [FBSDKShareDialog new];
dialog.delegate = self;
dialog.shareContent = content;
dialog.mode = FBSDKShareDialogModeBrowser;
if ([[UIApplication sharedApplication] canOpenURL:[NSURL URLWithString:@"fbauth2://"]])
    dialog.mode = FBSDKShareDialogModeAutomatic;
dialog.fromViewController = [UIApplication sharedApplication].keyWindow.rootViewController;




我试过了,但它没有用。



<input type="text" name="user">

<input type="password" name="password">

<div class="g-recaptcha" data-sitekey="6LdE0w0TAAAAANiqzyAxL1twu4X4ONWrmV0SMv7j" data-type="image"><div style="width: 304px; height: 78px;"><div><iframe src="https://www.google.com/recaptcha/api2/anchor?k=6LdE0w0TAAAAANiqzyAxL1twu4X4ONWrmV0SMv7j&amp;co=aHR0cHM6Ly93d3cub3B0ZW4uaHU6NDQz&amp;hl=hu&amp;type=image&amp;v=r20170613131236&amp;size=normal&amp;cb=g91tkr9x9ezg" title="recaptcha modul" width="304" height="78" frameborder="0" scrolling="no" sandbox="allow-forms allow-modals allow-popups allow-popups-to-escape-sandbox allow-same-origin allow-scripts allow-top-navigation"></iframe></div><textarea id="g-recaptcha-response" name="g-recaptcha-response" class="g-recaptcha-response" style="width: 250px; height: 40px; border: 1px solid #c1c1c1; margin: 10px 25px; padding: 0px; resize: none;  display: none; "></textarea></div></div>

<input class="standard" type="submit" value="Belépés">
&#13;
&#13;
&#13;

0 个答案:

没有答案