<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: dustfree</title>
    <description>The latest articles on DEV Community by dustfree (@dustfree).</description>
    <link>https://dev.to/dustfree</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F920546%2F2a8aa8bc-29b1-4169-b095-ef2bcc4fe381.jpg</url>
      <title>DEV Community: dustfree</title>
      <link>https://dev.to/dustfree</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/dustfree"/>
    <language>en</language>
    <item>
      <title>python_requests_05肯德基餐厅位置查询器</title>
      <dc:creator>dustfree</dc:creator>
      <pubDate>Sun, 04 Sep 2022 08:08:45 +0000</pubDate>
      <link>https://dev.to/dustfree/pythonrequests05ken-de-ji-can-ting-wei-zhi-cha-xun-qi-i4a</link>
      <guid>https://dev.to/dustfree/pythonrequests05ken-de-ji-can-ting-wei-zhi-cha-xun-qi-i4a</guid>
      <description>&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;#! C:\Users\neo\Desktop\pyfiles\venv python
# -*- coding:utf-8 -*-
import requests
import json
if __name__ == "__main__":
    #指定url
    post_url = 'http://www.kfc.com.cn/kfccda/ashx/GetStoreList.ashx?op=keyword'
    #UA伪装
    headers = {
        'User-Agent':'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.186 Safari/537.36'
    }
    #post请求参数处理
    word = input('Enter a China city name:')
    data = {
        'cname':'',
        'pid':'',
        'keyword': word,
        'pageIndex':'1',
        'pageSize': '10',
    }
    #请求发送
    response = requests.post(url=post_url,data=data,headers=headers)
    #获取响应数据
    page_text = response.text
    #持久化存储
    fileName = word+'肯德基位置查询.txt'
    fp = open(fileName,'w',encoding='utf-8')
    json.dump(page_text,fp=fp,ensure_ascii=False)
    print('成功结束！')
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
    </item>
    <item>
      <title>python_requests_04豆瓣电影排行榜爬取</title>
      <dc:creator>dustfree</dc:creator>
      <pubDate>Sun, 04 Sep 2022 08:07:15 +0000</pubDate>
      <link>https://dev.to/dustfree/pythonrequests04dou-ban-dian-ying-pai-xing-bang-pa-qu-5919</link>
      <guid>https://dev.to/dustfree/pythonrequests04dou-ban-dian-ying-pai-xing-bang-pa-qu-5919</guid>
      <description>&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;#! C:\Users\neo\Desktop\pyfiles\venv python
# -*- coding:utf-8 -*-
import requests
import json
if __name__ == "__main__":
    #指定url
    url = 'https://movie.douban.com/j/chart/top_list?'
    param = {
        'type': '11',
        'interval_id': '100:90',
        'action':'',
        'start': '0',    #从库中的第几部电影开始爬取
        'limit': '30',   #单次爬取的个数
    }
    headers = {
       'User-Agent':'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.186 Safari/537.36'
   }
    response = requests.get(url=url,params=param,headers=headers)
    #获取响应数据  json()方法返回的是obj(需确认响应数据为json格式)
    list_data = response.json()
    #持久化存储
    fp = open('豆瓣剧情排行榜.json','w',encoding='utf-8')
    json.dump(list_data,fp=fp,ensure_ascii=False)

    print('成功结束！')
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
    </item>
    <item>
      <title>python_requests_03百度翻译自动查询器</title>
      <dc:creator>dustfree</dc:creator>
      <pubDate>Sun, 04 Sep 2022 08:03:35 +0000</pubDate>
      <link>https://dev.to/dustfree/pythonrequests03bai-du-fan-yi-zi-dong-cha-xun-qi-3f5</link>
      <guid>https://dev.to/dustfree/pythonrequests03bai-du-fan-yi-zi-dong-cha-xun-qi-3f5</guid>
      <description>&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;#! C:\Users\neo\Desktop\pyfiles\venv python
# -*- coding:utf-8 -*-
import requests
import json
if __name__ == "__main__":
    #指定url
    post_url = 'https://fanyi.baidu.com/sug'
    #UA伪装
    headers = {
        'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.186 Safari/537.36'
    }
    #post请求参数处理
    word = input('Enter a word:')
    data = {
        'kw': word,
    }
    #发送post请求
    response = requests.post(url=post_url,data=data,headers=headers)
    #获取响应数据并处理    json()方法返回的是obj(需确认响应数据为json格式)
    dict_obj = response.json()
    #持久化存储
    fileName = word+'.json'
    fp = open(fileName,'w',encoding='utf-8')
    json.dump(dict_obj,fp=fp,ensure_ascii=False)

    print('成功结束！')
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
    </item>
    <item>
      <title>python_requests_02搜索结果页面采集器</title>
      <dc:creator>dustfree</dc:creator>
      <pubDate>Sun, 04 Sep 2022 08:01:58 +0000</pubDate>
      <link>https://dev.to/dustfree/pythonrequests02sou-suo-jie-guo-ye-mian-cai-ji-qi-895</link>
      <guid>https://dev.to/dustfree/pythonrequests02sou-suo-jie-guo-ye-mian-cai-ji-qi-895</guid>
      <description>&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;#! C:\Users\neo\Desktop\pyfiles\venv python
# -*- coding:utf-8 -*-
import requests
if __name__ == "__main__":
    #UA伪装：将对应的User-Agent封装到一个字典中。
    headers = {
        'User-Agent':'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.186 Safari/537.36'
    }
    url = 'https://www.sogou.com/web'
    #处理url携带的参数：封装到字典中
    kw = input('Enter a word:')
    param = {
        'query':kw
    }
    #对指定的url发起的请求携带了一些参数。
    response = requests.get(url=url,params=param,headers=headers)

    page_text = response.text
    fileName = kw+'.html'
    with open(fileName,'w',encoding='utf-8') as fp:
        fp.write(page_text)
    print(fileName,'保存成功！')
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
    </item>
    <item>
      <title>python_requests_01爬取搜狗首页</title>
      <dc:creator>dustfree</dc:creator>
      <pubDate>Sun, 04 Sep 2022 07:55:21 +0000</pubDate>
      <link>https://dev.to/dustfree/pythonrequests-pa-qu-sou-gou-shou-ye-51i6</link>
      <guid>https://dev.to/dustfree/pythonrequests-pa-qu-sou-gou-shou-ye-51i6</guid>
      <description>&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;#! C:\Users\neo\Desktop\pyfiles\venv python
# -*- coding:utf-8 -*-
#需求：爬取sogou.com首页
import requests
if __name__ == "__main__":
    #指定url
    url = 'https://www.sogou.com/'
    #发起请求        #get方法会返回一个响应对象
    response = requests.get(url=url)
    #获取响应数据     #.text返回字符串形式的响应数据
    page_text = response.text
    print(page_text)
    #持久化存储
    with open(r'C:\Users\neo\Desktop\pyfiles\sogou.html','w',encoding='utf-8') as fp:
        fp.write(page_text)
    print('爬取数据结束！')
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
    </item>
    <item>
      <title>Centos7上搭建DVWA网站（基于宝塔）</title>
      <dc:creator>dustfree</dc:creator>
      <pubDate>Sun, 04 Sep 2022 07:39:43 +0000</pubDate>
      <link>https://dev.to/dustfree/centos7shang-da-jian-dvwawang-zhan-ji-yu-bao-ta--1j5m</link>
      <guid>https://dev.to/dustfree/centos7shang-da-jian-dvwawang-zhan-ji-yu-bao-ta--1j5m</guid>
      <description>&lt;p&gt;1、安装宝塔套件——宝塔官网有远程安装代码&lt;br&gt;
&lt;a href="https://www.bt.cn/bbs/thread-19376-1-1.html"&gt;https://www.bt.cn/bbs/thread-19376-1-1.html&lt;/a&gt;&lt;br&gt;
2、下载DVWA并上传至/www/wwwroot目录&lt;br&gt;
3、修改config.inc.php中的数据库链接用户密码——与宝塔面板中一致&lt;br&gt;
4、访问宝塔面板并新建网站、新建数据库&lt;br&gt;
5、实体机域名解析——hosts文件中添加192.168.8.132  dvwa.org&lt;br&gt;
6、浏览器访问dvwa.org并点击网页底部的”Create/Reset Database"，自动跳转登录页面后admin/password访问。&lt;/p&gt;

</description>
    </item>
    <item>
      <title>This is my skill 谱系.</title>
      <dc:creator>dustfree</dc:creator>
      <pubDate>Sun, 04 Sep 2022 07:31:06 +0000</pubDate>
      <link>https://dev.to/dustfree/this-is-my-skill-pu-xi--5g73</link>
      <guid>https://dev.to/dustfree/this-is-my-skill-pu-xi--5g73</guid>
      <description>&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--lXp6-ua7--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/bhuqtyswaec2l3nzcqdp.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--lXp6-ua7--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/bhuqtyswaec2l3nzcqdp.png" alt="Image description" width="880" height="468"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
    </item>
  </channel>
</rss>
