网址1:
https://pypi.org/search/?c=Programming+Language+%3A%3A+Python+%3A%3A+3
网址2:
https://pypi.org/project/qface-qtcpp/#files
试过常规方法,不行
1条回答 默认 最新
- 关注
码龄 粉丝数 原力等级 --
- 被采纳
- 被点赞
- 采纳率
threenewbee 2020-02-27 21:07最佳回答 专家已采纳这两个网站没有什么特别,唯一就是境外,建议你先建立科学的连接,然后访问
import requests res = requests.get('https://pypi.org/search/?c=Programming+Language+%3A%3A+Python+%3A%3A+3') res.encoding = 'utf-8' print(res.text)
源代码太多了,我这里各贴出前100行
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="defaultLanguage" content="en"> <meta name="availableLanguages" content="en, es, fr, ja, pt_BR, uk, el, de"> <title>Search results · PyPI</title> <meta name="description" content="The Python Package Index (PyPI) is a repository of software for the Python programming language."> <link rel="stylesheet" href="/static/css/warehouse.26fd4b09.css"> <link rel="stylesheet" href="/static/css/fontawesome.91df071f.css"> <link rel="stylesheet" href="/static/css/regular.8819f1a9.css"> <link rel="stylesheet" href="/static/css/solid.002489ee.css"> <link rel="stylesheet" href="/static/css/brands.0c9eb08b.css"> <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:400,400italic,600,600italic,700,700italic%7CSource+Code+Pro:500"> <noscript> <link rel="stylesheet" href="/static/css/noscript.69d08c82.css"> </noscript> <link rel="icon" href="/static/images/favicon.6a76275d.ico" type="image/x-icon"> <link rel="alternate" type="application/rss+xml" title="RSS: 40 latest updates" href="/rss/updates.xml"> <link rel="alternate" type="application/rss+xml" title="RSS: 40 newest packages" href="/rss/packages.xml"> <meta property="og:url" content="https://pypi.org/search/?c=Programming+Language+%3A%3A+Python+%3A%3A+3"> <meta property="og:site_name" content="PyPI"> <meta property="og:type" content="website"> <meta property="og:image" content="https://pypi.org/static/images/twitter.c0030826.jpg"> <meta property="og:title" content="Search results"> <meta property="og:description" content="The Python Package Index (PyPI) is a repository of software for the Python programming language."> <link rel="search" type="application/opensearchdescription+xml" title="PyPI" href="/opensearch.xml"> <script src="https://cdn.ravenjs.com/3.26.2/raven.min.js" integrity="sha384-D6LXy67EIC102DTuqypxwQsTHgiatlbvg7q/1YAWFb6lRyZ1lIZ6bGDsX7jxHNKA" crossorigin="anonymous"> </script> <script async data-ga-id="UA-55961911-1" data-sentry-frontend-dsn="https://3a67b35c9dc248a191d761410b095861@sentry.io/1231155" src="/static/js/warehouse.092c6255.js"> </script> <script async src="https://www.googletagmanager.com/gtag/js?id=UA-55961911-1"></script> <script defer src="https://www.fastly-insights.com/insights.js?k=6a52360a-f306-421e-8ed5-7417d0d4a4e9&dnt=true"></script> </head> <body data-controller="viewport-toggle"> <!-- Accessibility: this link should always be the first piece of content inside the body--> <a href="#content" class="skip-to-content">Skip to main content</a> <button type="button" class="button button--primary button--switch-to-mobile hidden" data-target="viewport-toggle.switchToMobile" data-action="viewport-toggle#switchToMobile"> Switch to mobile version </button> <div id="sticky-notifications" class="stick-to-top js-stick-to-top"> <!-- Add browser warning. Will show for ie9 and below --> <!--[if IE]> <div class="notification-bar notification-bar--warning" role="status"> <span class="notification-bar__icon"> <i class="fa fa-exclamation-triangle" aria-hidden="true"></i> <span class="sr-only">Warning</span> </span> <span class="notification-bar__message">You are using an unsupported browser, upgrade to a newer version.</span> </div> <![endif]--> <noscript> <div class="notification-bar notification-bar--warning" role="status"> <span class="notification-bar__icon"> <i class="fa fa-exclamation-triangle" aria-hidden="true"></i> <span class="sr-only">Warning</span> </span> <span class="notification-bar__message">Some features may not work without JavaScript. Please try enabling it if you encounter problems.</span> </div> </noscript> </div> <div data-html-include="/_includes/flash-messages/"> </div>
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="defaultLanguage" content="en"> <meta name="availableLanguages" content="en, es, fr, ja, pt_BR, uk, el, de"> <title>qface-qtcpp · PyPI</title> <meta name="description" content="Qt CPP generator based on the QFace library"> <link rel="stylesheet" href="/static/css/warehouse.26fd4b09.css"> <link rel="stylesheet" href="/static/css/fontawesome.91df071f.css"> <link rel="stylesheet" href="/static/css/regular.8819f1a9.css"> <link rel="stylesheet" href="/static/css/solid.002489ee.css"> <link rel="stylesheet" href="/static/css/brands.0c9eb08b.css"> <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:400,400italic,600,600italic,700,700italic%7CSource+Code+Pro:500"> <noscript> <link rel="stylesheet" href="/static/css/noscript.69d08c82.css"> </noscript> <link rel="icon" href="/static/images/favicon.6a76275d.ico" type="image/x-icon"> <link rel="alternate" type="application/rss+xml" title="RSS: 40 latest updates" href="/rss/updates.xml"> <link rel="alternate" type="application/rss+xml" title="RSS: 40 newest packages" href="/rss/packages.xml"> <link rel="canonical" href="https://pypi.org/project/qface-qtcpp/"> <meta property="og:url" content="https://pypi.org/project/qface-qtcpp/"> <meta property="og:site_name" content="PyPI"> <meta property="og:type" content="website"> <meta property="og:image" content="https://pypi.org/static/images/twitter.c0030826.jpg"> <meta property="og:title" content="qface-qtcpp"> <meta property="og:description" content="Qt CPP generator based on the QFace library"> <link rel="search" type="application/opensearchdescription+xml" title="PyPI" href="/opensearch.xml"> <script src="https://cdn.ravenjs.com/3.26.2/raven.min.js" integrity="sha384-D6LXy67EIC102DTuqypxwQsTHgiatlbvg7q/1YAWFb6lRyZ1lIZ6bGDsX7jxHNKA" crossorigin="anonymous"> </script> <script async data-ga-id="UA-55961911-1" data-sentry-frontend-dsn="https://3a67b35c9dc248a191d761410b095861@sentry.io/1231155" src="/static/js/warehouse.092c6255.js"> </script> <script async src="https://www.googletagmanager.com/gtag/js?id=UA-55961911-1"></script> <script defer src="https://www.fastly-insights.com/insights.js?k=6a52360a-f306-421e-8ed5-7417d0d4a4e9&dnt=true"></script> </head> <body data-controller="viewport-toggle"> <!-- Accessibility: this link should always be the first piece of content inside the body--> <a href="#content" class="skip-to-content">Skip to main content</a> <button type="button" class="button button--primary button--switch-to-mobile hidden" data-target="viewport-toggle.switchToMobile" data-action="viewport-toggle#switchToMobile"> Switch to mobile version </button> <div id="sticky-notifications" class="stick-to-top js-stick-to-top"> <!-- Add browser warning. Will show for ie9 and below --> <!--[if IE]> <div class="notification-bar notification-bar--warning" role="status"> <span class="notification-bar__icon"> <i class="fa fa-exclamation-triangle" aria-hidden="true"></i> <span class="sr-only">Warning</span> </span> <span class="notification-bar__message">You are using an unsupported browser, upgrade to a newer version.</span> </div> <![endif]--> <noscript> <div class="notification-bar notification-bar--warning" role="status"> <span class="notification-bar__icon"> <i class="fa fa-exclamation-triangle" aria-hidden="true"></i> <span class="sr-only">Warning</span> </span> <span class="notification-bar__message">Some features may not work without JavaScript. Please try enabling it if you encounter problems.</span> </div> </noscript> </div>
采纳该答案 已采纳该答案 专家已采纳评论解决 无用 1打赏举报微信扫一扫
分享评论登录 后可回复...
报告相同问题?
提交
相关推荐 更多相似问题
- 2020-02-27 20:55回答 1 已采纳 这两个网站没有什么特别,唯一就是境外,建议你先建立科学的连接,然后访问 ``` import requests res = requests.get('https://pypi.org/
- 2020-02-27 20:30回答 1 已采纳 这两个网站没有什么特别,唯一就是境外,建议你先建立科学的连接,然后访问 ``` import requests res = requests.get('https://pypi.org/
- 2021-08-27 18:36回答 1 已采纳 就直接创建两个线程 自己跑被。。。thread1 = Thread(target=xxx)thread1.start()thread2 = Thread(target=xxx)thread2.star
- 2021-06-16 23:05回答 2 已采纳 s = '12345' rs = s[-2::] print(rs) 如果对你有帮助,可以点击我这个回答右上方的【采纳】按钮,给我个采纳吗,谢谢
- 2019-10-03 08:37回答 1 已采纳 可以直接限定两个数的都是在 0-50 范围内的随机数,那么就能保证和满足条件了。 Python 随机数使用参考: ``` import random random.randint(0,50
- 2018-01-24 11:06回答 7 已采纳 listone=['你好','小明','学习','非常','好'] listtwo=['你好','小红','学习','非常','棒'] len(set(listone)&set(listtwo))
- 2021-08-12 18:39回答 2 已采纳 实在不行,建议把相关目录删掉,重新安装python环境和配置环境。
- 2022-04-24 21:27回答 2 已采纳 https://ask.csdn.net/questions/7700919?spm=1005.2025.3001.5141参考这个回答
- 2020-07-26 09:08回答 2 已采纳 json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0) 看看你的编码,是不是不是utf8或者包含了不合法的字符
- 2019-09-20 17:43回答 3 已采纳 可以用 DataFrame 的 group 分组,然后对组内的元素查找最大和第二大的日期。 完整代码如下: ``` from pandas import Series,DataFrame
- 没有解决我的问题, 去提问