Sao operation! Home peels use Baidu picture Upload API do figure Bed

Sao operation! Home peels use Baidu picture Upload API do figure Bed

Parsing API

Figure Beds: specifically used to store pictures, while allowing access to the network address space outside the chain of these pictures.

To put it plainly, map bed that you upload an image, it returns give you a link, this link will be able to view this picture.

Now many people are accustomed creation with markdown, markdown benefits that people focus on creation. The creative process, inevitably with some of the images related to the topic, with pictures of the benefits that can greatly improve the readability of the article. If an article does not even have a picture, it did not estimate how many people can sit through. The bed is a chart with pictures of choice for most people.

Baidu recently discovered home peels (upper left corner of the page) can be customized, the ability to upload your own picture, then! If it also returns an image link, is it possible. . . .

Press F12, network analysis, greeted by a huge pile of links, this is very noticeable upload Okay, point to open to see.

Full link is very doubtful, push lightly push lightly down and see upload data.

Find Form Data, point of view source to see the original upload data, Oops! This is not what I picture a local name? Feeling from the truth is getting closer and there are wood.

Remember prerequisite map bed is to return the image links you to view the contents of return, it is json data! Favorite json data up! Point to open to see.

I can see the file name! That link below do not need me to say it?

At this point, we can counter-push, considered the most daring began to upload link that we think we are looking for API, that is:
https://sp0.baidu.com/6_R1fD_bAAd3otqbppnN2DJv/Pic/upload?pid=super&app=skin&logid=你自己的百度登录id

Packaging API

At this point, the entire carding process even if done, since we got the API is no need to have it in the Baidu home page uploaded, had by its crop settings. Write our own program that used to upload get away!

Use real steps:

  1. The above HTML code into your own logid.

  2. Login Baidu account in the browser.

  3. Just open the saved HTML file in a browser.

  4. upload image.

  5. Json data returned will be able to see the real link, the link in the escape character can be removed. Or copy data to json json analytic tools (Recommended: http://c.runoob.com/front-end/53), the post-processing can be obtained directly linked .

    json.gif

  6. Enjoy!

相应的 HTML 文件我已经为你打包好了,在公众号中回复 “图床” 即可获得。

本文的静态图片都是用该方法上传到百度图床的,理论用该方法上传的图片是永久有效的,如果你看到方法失效可以加我微信告诉我一声,我再找新方法,或者有什么新想法也可以加我微信交流。

Guess you like

Origin www.cnblogs.com/banshaohuan/p/12112018.html