小编hil*_*n92的帖子

Pycharm 语言注入 f 字符串

我试图让 PyC​​harm 通过语言注入功能将 f 字符串识别为 SQL 查询。

PyCharm 似乎不会评估 f 字符串,然后运行语言注入测试。

有没有办法设置 PyCharm 来评估和确定语言?我注意到,如果 f 字符串不包含任何变量,则语言注入确实有效。

例如:

f""" select * from foo where id > 10"""检测 SQL

f""" select * from foo where id > {id_threshold}"""不检测 SQL

这也适用于其他语言的语言注入

python pycharm

5
推荐指数
0
解决办法
336
查看次数

使用 Python 登录 https 网站

我是在stackoverflow上发帖的新手,所以请不要咬!我不得不求助于记帐并寻求帮助,以避免再把我的头撞在桌子上......

我正在尝试使用 python 中的请求模块登录到以下网站https://account.socialbakers.com/login。似乎请求模块是要去的地方,但 session.post() 函数对我不起作用。我不知道这种类型的表格是否有什么独特之处,或者网站是 https://

登录表单如下:

<form action="/login" id="login-form" method="post" novalidate="">
        <big class="error-message">
         <big>
          <strong>
          </strong>
         </big>
        </big>
        <div class="item-full">
         <label for="">
          <span class="label-header">
           <span>
            Your e-mail address
           </span>
          </span>
          <input id="email" name="email" type="email"/>
         </label>
        </div>
        <div class="item-list">
         <div class="item-big">
          <label for="">
           <span class="label-header">
            <span>
             Password
            </span>
           </span>
           <input id="password" name="password" type="password"/>
          </label>
         </div>
         <div class="item-small">
          <button class="btn btn-green" type="submit">
           Login
          </button>
         </div>
        </div>
        <p>
         <a href="/email/reset-password">
          <strong>
           Lost password?
          </strong>
         </a>
        </p>
       </form>
Run Code Online (Sandbox Code Playgroud)

基于以下帖子如何使用 …

python web-scraping python-requests

1
推荐指数
1
解决办法
6634
查看次数

标签 统计

python ×2

pycharm ×1

python-requests ×1

web-scraping ×1