刺猬在天冷时围抱取暖,但保持一定距离避免相互刺伤|

jinganglang567

园龄:4年5个月粉丝:0关注:20

2023-01-05 18:17阅读: 57评论: 0推荐: 0

爬取百度翻译

#破解百度翻译
#阿贾克斯请求,局部刷新,对应fetch/XHR,最后的sug
#学会查看请求,选择函数
import os
import requests
import json
post_url='https://fanyi.baidu.com/sug'#学会找链接
#查询参数可以确定参数的类型和名字
word=input('请输入你要翻译的词')
data={
    'kw':word
}
headers={
    'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/95.0.4638.54 Safari/537.36 Edg/95.0.1020.30'
}
html = requests.post(url=post_url,data=data,headers=headers)
#根据返回数据类型选择合适的函数///响应头可以确定
htmljson=html.json()
print(htmljson)
#讲json文件存储
#fn=open('F:/spidertest/'+word+'.json','a',encoding='utf-8')
#json.dump(htmljson,fp=fn,ensure_ascii=False)#中文不能使用ASCII码
print('over!!!!')
os.system('pause')






本文作者:jinganglang567

本文链接:https://www.cnblogs.com/tgfoven/p/17028560.html

版权声明:本作品采用知识共享署名-非商业性使用-禁止演绎 2.5 中国大陆许可协议进行许可。

posted @   jinganglang567  阅读(57)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· TypeScript + Deepseek 打造卜卦网站:技术与玄学的结合
· 阿里巴巴 QwQ-32B真的超越了 DeepSeek R-1吗?
· 【译】Visual Studio 中新的强大生产力特性
· 10年+ .NET Coder 心语 ── 封装的思维:从隐藏、稳定开始理解其本质意义
· 【设计模式】告别冗长if-else语句:使用策略模式优化代码结构
  1. 1 look after you louis tomlinson
  2. 2 just hold on louis tomlinson
  3. 3 i can steven cooper
  4. 4 rock me one direction
  5. 5 just can't let her go one direction
  6. 6 this town Niall Horan
  7. 7 cut in love july
  8. 8 nemo 夜愿
  9. 9 in the end Black Veil Brides
  10. 10 glad you came the wanted
  11. 11 chasing the sun the wanted
  12. 12 TAKE MY HAND simple plan
  13. 13 wish i had an angel 夜愿
this town - Niall Horan
00:00 / 00:00
An audio error has occurred, player will skip forward in 2 seconds.

作词 : Jamie Scott/Mike Needle/Daniel Bryer/Niall Horan

作曲 : Jamie Scott/Mike Needle/Daniel Bryer/Niall Horan

Waking up to kiss you and nobody's there

The smell of your perfume still stuck in the air

It's hard

Yesterday I thought I saw your shadow running round

It's funny how things never change in this old town

So far from the stars

And I want to tell you everything

The words I never got to say the first time around

And I remember everything

From when we were the children playing in this fairground

Wish I was there with you now

If the whole world was watching I'd still dance with you

Drive highways and byways to be there with you

Over and over the only truth

Everything comes back to you

I saw that you moved on with someone new

In the pub that we met he's got his arms around you

It's so hard

So hard

And I want to tell you everything

The words I never got to say the first time around

And I remember everything

From when we were the children playing in this fairground

Wish I was there with you now

Because if the whole world was watching I'd still dance with you

Drive highways and byways to be there with you

Over and over the only truth

Everything comes back to you

You still make me nervous when you walk in the room

Them butterflies they come alive when I'm next to you

Over and over the only truth

Everything comes back to you

And I know that it's wrong

That I can't move on

But there's something about you

If the whole world was watching I'd still dance with you

Drive highways and byways to be there with you

Over and over the only truth

Everything comes back to you

You still make me nervous when you walk in the room

Them butterflies they come alive when I'm next to you

Over and over the only truth

Everything comes back to you

Everything comes back to you

点击右上角即可分享
微信分享提示
评论
收藏
关注
推荐
深色
回顶
收起