Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to use R language and Python to climb Zhihumeitu

2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/02 Report--

How to use R language and Python to climb Zhihumitu, in view of this problem, this article introduces the corresponding analysis and solution in detail, hoping to help more partners who want to solve this problem to find a more simple and easy way.

Learning Python has been more than two months, it is time to test the learning effect, before practicing a lot of R language data crawling, Python crawler module has not had time to seriously get started, cobbled together in a hurry to start, today try to use R+Python to crawl pictures, to complete a simple crawler.

The target URL is here:

Https://www.zhihu.com/question/35931586/answer/206258333

R language version:

Library (rvest)

Library (downloader)

Url%

Html_nodes ("img") > html_attr ("data-original") > na.omit

# with the help of Chrome's review element function, with the help of its path copy function to accurately locate the node where the picture is located

Link%html_attr ("data-original") > na.omit

Link

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report