Python methods for obtaining market recruitment information

Source: Internet
Author: User
This article mainly shares the previous article about how to use Python to obtain market recruitment information, interested friends can refer to this article to share the previous article on how to use Python to obtain market recruitment information. interested friends can refer

This article describes how to obtain information about a website and how to obtain recruitment information from www.net.com. the key code for obtaining recruitment information from www.net.com using python is as follows:

Import reimport urllibimport urllib. request # obtain online data def begin (url): # The Web browser to be disguised as (chrome I use) headers = ('User-agent ', 'mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.86 Safari/80') opener = urllib. request. build_opener () # add the browser to be disguised as the corresponding http header opener. addheaders = [headers] # read the corresponding url data = opener. open (url ). read () # decodes the obtained html to UTF-8 data = data. decode ('utf-8 ') Return data # process the data and return the dictionary City's urldef get_cityinfo (data): city_info1 = re. findall (r'dl> (.*?)', Data, re. s) city_info2 = re. findall (r' () ', city_info1 [0], re. s) city_dict ={}for each in city_info2: key = re. findall ('> (. *?)
 (.*?)
 ', Cdzp_info, re. S) a_dict = {} class_info = re. findall ('
 
 
(.*?)
', Allzp_info [0], re. s) for each in class_info: a_info = re. findall (r' () ', each, re. s) for each1 in a_info: key = re. findall ('> (. *?)

The above is all the content of this article, hoping to help you learn.

For more Python methods for obtaining market recruitment information, please follow the PHP Chinese network!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.