V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX  ›  harvies  ›  全部回复第 3 页 / 共 3 页
回复总数  51
1  2  3  
2019 年 6 月 1 日
回复了 melonux 创建的主题 Python 哪里可以买到价格实惠的代理池?
@melonux 上个月我爬过淘宝,绕过了反爬机制(人工智能检测,就像 google 的验证码),没有换 ip,你正常上微博,它会封你吗,很多用户都是内网,容易误封
2019 年 5 月 31 日
回复了 melonux 创建的主题 Python 哪里可以买到价格实惠的代理池?
不是代理的问题,是检测你的行为
2019 年 5 月 21 日
回复了 onecode 创建的主题 Python 技术渣,谁给写个爬虫,感谢
import json
import os

import requests

if __name__ == '__main__':
flag = True
page = 1
while flag:
print("page:" + str(page))
list_html = requests.get("http://adr.meizitu.net/wp-json/wp/v2/posts?page=" + str(page) + "&per_page=20")
content = list_html.content
json_loads = json.loads(content)
if isinstance(json_loads, list):
print(json_loads)
for list_item in json_loads:
id_ = list_item['id']
title = list_item['title']
print(title)
detail_html = requests.get("http://adr.meizitu.net/wp-json/wp/v2/i?id=" + str(id_))
detail_json = json.loads(detail_html.content)
print(detail_json)
str_content_ = detail_json['content']
content__split = str_content_.split(',')
print('downloading ' + str(content__split))
for detail_item in content__split:
print(detail_item)
rfind = detail_item.rfind('/')
file_name = detail_item[rfind + 1:len(detail_item)]
folder_path = "./images/" + title + '/'
if not os.path.exists(folder_path):
os.makedirs(folder_path)
requests_get = requests.get(detail_item)
with open(folder_path + file_name, "wb") as f:
f.write(requests_get.content)
else:
code_ = json_loads['code']
if code_ != 'rest_post_invalid_page_number':
print(code_)
else:
print(code_ + " exit")
flag = False
page += 1
2019 年 3 月 3 日
回复了 VoidChen 创建的主题 问与答 求教最好的 Linux 日常使用方案
manjaro 也可以(archlinux 衍生版),用过好多 linux 发行版,最后还是选择 arch 了, https://i.imgur.com/7NPX24W.png
2019 年 3 月 3 日
回复了 mfanming 创建的主题 新手求助 v2ex 怎么发图?
2019 年 3 月 3 日
回复了 VoidChen 创建的主题 问与答 求教最好的 Linux 日常使用方案
上 archlinux 吧 qq 微信都正常使用(wine),不会发图片,上外链吧 https://s2.ax1x.com/2019/03/03/kLIv90.png
star 支持
2018 年 10 月 15 日
回复了 hhhsuan 创建的主题 问与答 如何在国内使用抖音国际版版?
旧版,正在用
https://pan.baidu.com/s/1eTUE-qHXYFnJw-vkdhA-7g 密码:qwer,拿走,不谢
2018 年 10 月 4 日
回复了 dante1029 创建的主题 推广 明天女儿生日,盖楼送 5 件 T 恤。
生快
1  2  3  
关于   ·   帮助文档   ·   自助推广系统   ·   博客   ·   API   ·   FAQ   ·   Solana   ·   2272 人在线   最高记录 6679   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 23ms · UTC 00:41 · PVG 08:41 · LAX 16:41 · JFK 19:41
♥ Do have faith in what you're doing.