[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-10837":3},{"id":4,"name":5,"fullName":6,"owner":5,"repo":5,"description":7,"homepage":8,"htmlUrl":9,"language":10,"languages":9,"totalLinesOfCode":9,"stars":11,"forks":12,"watchers":13,"openIssues":14,"contributorsCount":15,"subscribersCount":15,"size":15,"stars1d":15,"stars7d":15,"stars30d":16,"stars90d":15,"forks30d":15,"starsTrendScore":15,"compositeScore":17,"rankGlobal":9,"rankLanguage":9,"license":18,"archived":19,"fork":19,"defaultBranch":20,"hasWiki":19,"hasPages":19,"topics":21,"createdAt":9,"pushedAt":9,"updatedAt":29,"readmeContent":30,"aiSummary":31,"trendingCount":15,"starSnapshotCount":15,"syncStatus":32,"lastSyncTime":33,"discoverSource":34},10837,"MechanicalSoup","MechanicalSoup\u002FMechanicalSoup","A Python library for automating interaction with websites.","http:\u002F\u002Fmechanicalsoup.readthedocs.io\u002Fen\u002Fstable\u002F",null,"Python",4867,391,102,31,0,10,29.78,"MIT License",false,"main",[22,23,24,25,26,27,28],"beautifulsoup","mechanicalsoup","pypi","python","python-library","requests","web","2026-06-12 02:02:27",".. image:: \u002Fassets\u002Fmechanical-soup-logo.png\n   :alt: MechanicalSoup. A Python library for automating website interaction.\n\nHome page\n---------\n\nhttps:\u002F\u002Fmechanicalsoup.readthedocs.io\u002F\n\nOverview\n--------\n\nA Python library for automating interaction with websites.\nMechanicalSoup automatically stores and sends cookies, follows\nredirects, and can follow links and submit forms. It doesn't do\nJavaScript.\n\nMechanicalSoup was created by `M Hickford\n\u003Chttps:\u002F\u002Fgithub.com\u002Fhickford\u002F>`__, who was a fond user of the\n`Mechanize \u003Chttps:\u002F\u002Fgithub.com\u002Fjjlee\u002Fmechanize>`__ library.\nUnfortunately, Mechanize was `incompatible with Python 3 until 2019\n\u003Chttps:\u002F\u002Fgithub.com\u002Fpython-mechanize\u002Fmechanize\u002Fissues\u002F9>`__ and its development\nstalled for several years. MechanicalSoup provides a similar API, built on Python\ngiants `Requests \u003Chttp:\u002F\u002Fdocs.python-requests.org\u002Fen\u002Flatest\u002F>`__ (for\nHTTP sessions) and `BeautifulSoup\n\u003Chttps:\u002F\u002Fwww.crummy.com\u002Fsoftware\u002FBeautifulSoup\u002F>`__ (for document\nnavigation). Since 2017 it is a project actively maintained by a small\nteam including `@hemberger \u003Chttps:\u002F\u002Fgithub.com\u002Fhemberger>`__ and `@moy\n\u003Chttps:\u002F\u002Fgithub.com\u002Fmoy\u002F>`__.\n\n|Gitter Chat|\n\nInstallation\n------------\n\n|Latest Version| |Supported Versions|\n\nPyPy3 is also supported (and tested against).\n\nDownload and install the latest released version from `PyPI \u003Chttps:\u002F\u002Fpypi.python.org\u002Fpypi\u002FMechanicalSoup\u002F>`__::\n\n  pip install MechanicalSoup\n\nDownload and install the development version from `GitHub \u003Chttps:\u002F\u002Fgithub.com\u002FMechanicalSoup\u002FMechanicalSoup>`__::\n\n  pip install git+https:\u002F\u002Fgithub.com\u002FMechanicalSoup\u002FMechanicalSoup\n\nInstalling from source (installs the version in the current working directory)::\n\n  pip install .\n\n(In all cases, add ``--user`` to the ``install`` command to\ninstall in the current user's home directory.)\n\nDocumentation\n-------------\n\nThe full documentation is available on\nhttps:\u002F\u002Fmechanicalsoup.readthedocs.io\u002F. You may want to jump directly to\nthe `automatically generated API\ndocumentation \u003Chttps:\u002F\u002Fmechanicalsoup.readthedocs.io\u002Fen\u002Fstable\u002Fmechanicalsoup.html>`__.\n\nExample\n-------\n\nFrom `\u003Cexamples\u002Fexpl_qwant.py>`__, code to get the results from\na Qwant search:\n\n.. code:: python\n\n    \"\"\"Example usage of MechanicalSoup to get the results from the Qwant\n    search engine.\n    \"\"\"\n\n    import re\n    import mechanicalsoup\n    import html\n    import urllib.parse\n\n    # Connect to Qwant\n    browser = mechanicalsoup.StatefulBrowser(user_agent='MechanicalSoup')\n    browser.open(\"https:\u002F\u002Flite.qwant.com\u002F\")\n\n    # Fill-in the search form\n    browser.select_form('#search-form')\n    browser[\"q\"] = \"MechanicalSoup\"\n    browser.submit_selected()\n\n    # Display the results\n    for link in browser.page.select('.result a'):\n        # Qwant shows redirection links, not the actual URL, so extract\n        # the actual URL from the redirect link:\n        href = link.attrs['href']\n        m = re.match(r\"^\u002Fredirect\u002F[^\u002F]*\u002F(.*)$\", href)\n        if m:\n            href = urllib.parse.unquote(m.group(1))\n        print(link.text, '->', href)\n\nMore examples are available in `\u003Cexamples\u002F>`__.\n\nFor an example with a more complex form (checkboxes, radio buttons and\ntextareas), read `\u003Ctests\u002Ftest_browser.py>`__\nand `\u003Ctests\u002Ftest_form.py>`__.\n\nDevelopment\n-----------\n\n|Build Status|\n|Coverage Status|\n|Documentation Status|\n|CII Best Practices|\n\nInstructions for building, testing and contributing to MechanicalSoup:\nsee `\u003CCONTRIBUTING.rst>`__.\n\nCommon problems\n---------------\n\nRead the `FAQ\n\u003Chttps:\u002F\u002Fmechanicalsoup.readthedocs.io\u002Fen\u002Fstable\u002Ffaq.html>`__.\n\n.. |Latest Version| image:: https:\u002F\u002Fimg.shields.io\u002Fpypi\u002Fv\u002FMechanicalSoup.svg\n   :target: https:\u002F\u002Fpypi.python.org\u002Fpypi\u002FMechanicalSoup\u002F\n.. |Supported Versions| image:: https:\u002F\u002Fimg.shields.io\u002Fpypi\u002Fpyversions\u002Fmechanicalsoup.svg\n   :target: https:\u002F\u002Fpypi.python.org\u002Fpypi\u002FMechanicalSoup\u002F\n.. |Build Status| image:: https:\u002F\u002Fgithub.com\u002FMechanicalSoup\u002FMechanicalSoup\u002Factions\u002Fworkflows\u002Fpython-package.yml\u002Fbadge.svg?branch=main\n   :target: https:\u002F\u002Fgithub.com\u002FMechanicalSoup\u002FMechanicalSoup\u002Factions\u002Fworkflows\u002Fpython-package.yml?query=branch%3Amain\n.. |Coverage Status| image:: https:\u002F\u002Fcodecov.io\u002Fgh\u002FMechanicalSoup\u002FMechanicalSoup\u002Fbranch\u002Fmain\u002Fgraph\u002Fbadge.svg\n   :target: https:\u002F\u002Fcodecov.io\u002Fgh\u002FMechanicalSoup\u002FMechanicalSoup\n.. |Documentation Status| image:: https:\u002F\u002Freadthedocs.org\u002Fprojects\u002Fmechanicalsoup\u002Fbadge\u002F?version=latest\n   :target: https:\u002F\u002Fmechanicalsoup.readthedocs.io\u002Fen\u002Flatest\u002F?badge=latest\n.. |CII Best Practices| image:: https:\u002F\u002Fbestpractices.coreinfrastructure.org\u002Fprojects\u002F1334\u002Fbadge\n   :target: https:\u002F\u002Fbestpractices.coreinfrastructure.org\u002Fprojects\u002F1334\n.. |Gitter Chat| image:: https:\u002F\u002Fbadges.gitter.im\u002FMechanicalSoup\u002FMechanicalSoup.svg\n   :target: https:\u002F\u002Fgitter.im\u002FMechanicalSoup\u002FLobby\n","MechanicalSoup 是一个用于自动化网站交互的 Python 库。它能够自动存储和发送 cookies，处理重定向，并支持链接跟踪和表单提交，但不支持 JavaScript。该库基于 Requests 和 BeautifulSoup 构建，提供了与 Mechanize 类似的 API，但兼容 Python 3。适合需要模拟用户行为进行网页抓取或测试的场景使用，如自动化数据收集、Web 应用程序的功能测试等。",2,"2026-06-11 03:30:24","top_topic"]