随笔分类 -  python网络

python网络
摘要:无需参数直接请求单个页面 import urllib from urllib.request import request from urllib.urlopen import urlopen # import urllib2 import requests # 使用 urllib 方式获取 res 阅读全文
posted @ 2020-04-28 22:21 程式交易 阅读(216) 评论(0) 推荐(0)
摘要:# encoding: utf8 #部分网站api数据有bug,这个bug问题不是自身程序的问题,而是第三方公司股票的问题 __author__ = 'nooper' import re from math import ceil import datetime from httpGet impor 阅读全文
posted @ 2020-04-28 22:16 程式交易 阅读(4633) 评论(0) 推荐(0)
摘要:# encoding:utf8 #部分股票数据历史价格有误,尤其是2011年以前的数据,等一些历史数据 #无论是yahoo还是新浪的 __author__ = 'nooper' import cStringIO import csv from bs4 import BeautifulSoup fro 阅读全文
posted @ 2020-04-25 23:16 程式交易 阅读(295) 评论(0) 推荐(0)
摘要:# -*- coding: utf-8 -*- import requests import traceback import re import os from bs4 import BeautifulSoup # 獲取網頁內容 def get_html_text(url): try: r = r 阅读全文
posted @ 2020-04-22 10:09 程式交易 阅读(404) 评论(0) 推荐(0)