Skip to content

Commit

Permalink
学习爬虫中
Browse files Browse the repository at this point in the history
  • Loading branch information
deadlyedge committed Apr 18, 2019
1 parent 1f935b7 commit 717c87a
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 0 deletions.
12 changes: 12 additions & 0 deletions bs4_practise.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
from bs4 import BeautifulSoup
import requests

data = requests.get('https://www.google.com').content

soup = BeautifulSoup(data, 'html.parser')
#
# links =soup.findAll('a')
# for link in links:
# print(link)

print(soup.body.div.attrs)
12 changes: 12 additions & 0 deletions text.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<!DOCTYPE html>
<html lang="cn">
<head>
<meta charset="UTF-8">
<title>This is our page</title>
</head>
<body>
<h1>This is H1</h1>
<p>something is here, love you guys!!!</p>

</body>
</html>
3 changes: 3 additions & 0 deletions ximalaya_audio_grab.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# -*- coding:utf-8 -*-

#抓取解析喜马拉雅的音频信息 存储 mongodb数据库

0 comments on commit 717c87a

Please sign in to comment.