Python-100-Days/Day66-75/code/example10a.py

15 lines
316 B
Python
Raw Normal View History

2018-06-13 23:04:15 +08:00
import requests
from bs4 import BeautifulSoup
def main():
resp = requests.get('https://v.taobao.com/v/content/live?catetype=704&from=taonvlang')
soup = BeautifulSoup(resp.text, 'lxml')
for img_tag in soup.select('img[src]'):
print(img_tag.attrs['src'])
if __name__ == '__main__':
main()