求大佬传奇720p迅雷下载借一个迅雷会员用一会,下载个游戏,谢谢大佬传奇720p迅雷下载

1321人阅读
Python(23)
java那条路(65)
好久不写爬虫。。。忘了个锤子。于是借着学java的机会用java写个爬虫
爬取静态页面 迅雷会员账号和密码。时时获取最新的~
先上我暑假写的python版~
import urllib
url1 = 'http://xlfans.com/'
regex = r'迅雷会员(.+?)密码(.*)&'
regex1 = r'class="item"&&a href="(.+?)"&'
ml = 'c:/xunlei.txt'
def get_html(url):
html1 = urllib.urlopen(url)
html = html1.read()
html1.close()
return html
def get_re(html):
xunlei = re.findall(regex,html)
for a in xunlei:
with open(ml,'a') as f:
b = a[0]+' '+a[1]
f.write(b+'\n')
def get_new(html):
new = re.findall(regex1,html)
return new[0]
html= get_html(url1)
url = get_new(html)
new_html = get_html(url)
if os.path.exists(ml):
os.remove(ml)
get_re(new_html)
print 'please look c:/xunlei.txt thankyou!'
print 'newurl= '+url
附一个暑假写的获取代理ip的小python代码:
import urllib2
url1 ='http://www.kuaidaili.com/'
html1 = urllib2.urlopen(url1)
html = html1.read()
html1.close()
regexip = r'data-title="IP"&(\d{1,3}.\d{1,3}.\d{1,3}.\d{1,3})'
regexport = r'data-title="PORT"&(\d{1,4})'
poxyip = re.findall(regexip,html)
poxyport = re.findall(regexport,html)
for x in range(10):
print poxyip[x]+':'+poxyport[x]
package com.R
import java.io.BufferedR
import java.io.BufferedW
import java.io.FileOutputS
import java.io.IOE
import java.io.InputS
import java.io.InputStreamR
import java.io.PrintW
import java.net.*;
import java.util.ArrayL
import java.util.L
import java.util.regex.M
import java.util.regex.P
public class pacdemo1 {
public static void main(String[] args) throws IOException {
System.out.println("程序开始....");
String str =newURL();
String url1 =str.replace("class=\"item\"&&a href=\"", " ");
String url = url1.replace("\"&", " ");
System.out.println(url);
http(url);
public static String html(String url1) throws IOException{
url = new URL(url1);
URLConnection connection = url.openConnection();
connection.connect();
BufferedReader in = null;
in = new BufferedReader(new InputStreamReader(connection.getInputStream(),"UTF-8"));
String result = null;
while((line=in.readLine())!=null){
System.out.println("获取到html....");
public static String newURL() throws IOException{
String newURL = null;
result= html("http://xlfans.com");
String regex ="class=\"item\"&&a href=\"(.+?)\"&";
Pattern pattern = Pattern.compile(regex);
Matcher matcher = pattern.matcher(result);
System.out.println("开始查找最新迅雷会员网址.....");
if(matcher.find()){
newURL = matcher.group(0);
else{System.out.println("sorry,没有找到,请更新正则"); }
return newURL;
public static void http(String newurl)throws IOException{
URL url = new URL(newurl);
result = html(url.toString());
String regex ="&br /&迅雷会员号(.+?)密码(.*)&br /&";
Pattern pattern = Pattern.compile(regex);
Matcher matcher = pattern.matcher(result);
String xunlei = null
String xunlei2= null
if(matcher.find()){
xunlei = matcher.group(0);
xunlei2= xunlei.replace("&br /&", "\n");
System.out.println(xunlei2);
else{System.out.println("sorry,没有找到,请更新正则"); }
} catch (MalformedURLException e) {
e.printStackTrace();
java版还有问题,总是还有一块一起匹配出来了。我是个萌新,忘大佬指点啊。java写爬虫真心烦啊。Python大法好。
导出jar 要注意是导出 可执行版的。不是单纯的jar文件。
java的爬虫是先用定义URL
url = new URL("www.baidu.com");
然后打开网址
URLConnection connection = url.openConnection()
connection.connect()
用流来接收html
BufferedReader in = null;
in = new BufferedReader(new InputStreamReader(connection.getInputStream(),"UTF-8"));
String result = null;
while((line=in.readLine())!=null){
然后用正则匹配,当然还有其他更好的方法~
java写的像C。。。以后要改。要学习。有空写动态网页的爬虫。Access denied | acg18.us used Cloudflare to restrict access
Please enable cookies.
What happened?
The owner of this website (acg18.us) has banned your access based on your browser's signature (40ebc22eae109324-ua98).4 月上旬,短视频应用抖音上线了反沉迷系统。在连续使用超过 1.5 小时后,抖音上就会出现使用时间过长的提示...
站长热评 建站热点
周热评榜周点击榜
数字商品交易平台,保护创作者的知识产权。
中文网站排行
叶根友字体主题下载
| | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | |
微信扫一扫拒绝访问 | steamcn.com | 百度云加速
请打开cookies.
此网站 (steamcn.com) 的管理员禁止了您的访问。原因是您的访问包含了非浏览器特征(40ebc237bcc143e3-ua98).
重新安装浏览器,或使用别的浏览器}

我要回帖

更多关于 大佬传奇720p迅雷下载 的文章

更多推荐

版权声明:文章内容来源于网络,版权归原作者所有,如有侵权请点击这里与我们联系,我们将及时删除。

点击添加站长微信