Git Product home page Git Product logo

Comments (2)

albertandking avatar albertandking commented on August 24, 2024
  1. 系统:win10
  2. Python 版本:3.11
  3. AKShare 版本:最新
  4. 接口的名称和代码:ak.stock_board_cons_ths
  5. 目前情况:无数据输出,尝试更换symbol,结果还是无数据。更换组内其他接口ak.stock_board_concept_cons_ths,ak.stock_board_concept_name_ths,ak.stock_board_concept_graph_ths有类似无数据的问题。可能与同花顺概念网站更新有关。
  6. Python错误提示(接口:ak.stock_board_concept_cons_ths):
    Traceback (most recent call last):
    File "D:\My documents\Python\pythonProject\ak.py", line 3, in
    stock_board_cons_ths_df = ak.stock_board_cons_ths(symbol="885611")
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "D:\My documents\Python\pythonProject\venv\Lib\site-packages\akshare\stock_feature\stock_board_concept_ths.py", line 406, in stock_board_cons_ths
    temp_df = pd.read_html(StringIO(r.text))[0]
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "D:\My documents\Python\pythonProject\venv\Lib\site-packages\pandas\io\html.py", line 1240, in read_html
    return _parse(
    ^^^^^^^
    File "D:\My documents\Python\pythonProject\venv\Lib\site-packages\pandas\io\html.py", line 1003, in _parse
    raise retained
    File "D:\My documents\Python\pythonProject\venv\Lib\site-packages\pandas\io\html.py", line 983, in _parse
    tables = p.parse_tables()
    ^^^^^^^^^^^^^^^^
    File "D:\My documents\Python\pythonProject\venv\Lib\site-packages\pandas\io\html.py", line 249, in parse_tables
    tables = self._parse_tables(self._build_doc(), self.match, self.attrs)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "D:\My documents\Python\pythonProject\venv\Lib\site-packages\pandas\io\html.py", line 598, in _parse_tables
    raise ValueError("No tables found")
    ValueError: No tables found

谢谢!

暂时无法访问,近期将移除该接口

from akshare.

g3wang avatar g3wang commented on August 24, 2024

这里存在两个问题:

  1. 同花顺概念代码,需要替换成内部代码, 比如885611 阿里巴巴概念, 对应的cid:301558,这样网址是:https://q.10jqka.com.cn/gn/detail/field/199112/order/desc/page/1/ajax/1/code/301558,这个网页是可以打开的。这个内部代码可以摘概念首页那里获得。
  2. 动态cookie会在访问多次网页会更换,而一般一个概念成分股需要超过6个网页,这样就会因为cookie改变而出问题。
    希望高手有办法,谢谢!

from akshare.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.