1 Star 0 Fork 0

吴超/huamei

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
q.py 2.25 KB
一键复制 编辑 原始数据 按行查看 历史
wmc 提交于 2019-10-20 22:27 . first commit
# from PyQt5.QtWidgets import QMessageBox
# import time
# QMessageBox.information(self,'as','qw',QMessageBox.Yes|QMessageBox.No)
# def information(self):
# QMessageBox.information(self,'as','qw',QMessageBox.Yes|QMessageBox.No,QMessageBox.No)
# information(1)
# import tkinter
# import tkinter.messagebox
# # from tkinter import messagebox
# tkinter.messagebox.showinfo('12','qw')
# messagebox.showinfo('12','qw')
import requests
headers = {
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.132 Safari/537.36"
}
# r=requests.post(r'http://httpbin.org/post',data={'kw':'rpa'},headers=headers)
# print(r.url)
# print(r.status_code)
# print(r.text)
# q={'酒店顾问': 11, '酒店顾问公司': '50+', '酒店咨询': '50+'}
# for i in q:
# print(i,q[i])
# t=time.strftime("%Y-%m-%d/%H:%M", time.localtime())
# print (t,type(t))
# import multiprocessing
# class Work():
# def __init__(self):
# self.name='w'
# def worker(self,procnum, return_dict):
# '''worker function'''
# print(str(procnum) + ' represent!')
# a={'q':1,'w':2}
# return_dict['work'] = a
# class Vork():
# def __init__(self):
# self.name='v'
# def worker(self,procnum, return_dict):
# '''worker function'''
# print(str(procnum) + 'v!')
# # return_dict[procnum] = procnum
# a={'qq':11,'ww':22}
# return_dict['vork']=a
# import requests
if __name__ == '__main__':
# url='https://www.google.com/search'
url='http://118.24.52.95:5010/'
# proxies={
# "http": "http://127.0.0.1:10801",
# "https": "https://127.0.0.1:10801",
# }
headers={
"Accept-Language": "zh-CN,zh;q=0.9,en;q=0.8,ja;q=0.7",
"User-Agent": "Mozilla/5.0 (Windows; U; Windows NT 6.1; en-us) AppleWebKit/534.50 (KHTML, like Gecko) Version/5.1 Safari/534.50",
}
# data = {"q": kw, "num": 10, "hl": "zh-CN",}
datas = {"q": "酒店顾问",}
# data = {"hl": "zh-CN",}
r=requests.get(url)
# r=requests.get(url,params=datas,proxies=proxies,headers=headers)
print(r.text)
print(r.status_code,r.url)
# with open('g.html','w',encoding='utf8')as f:
# f.write(r.text)
# # f.write(r.content.decode())
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/wumuchen/huamei.git
git@gitee.com:wumuchen/huamei.git
wumuchen
huamei
huamei
master

搜索帮助

0d507c66 1850385 C8b1a773 1850385