This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#need beautifulsoup for parse the html text | |
#python | |
# | |
#获取相册页面,分析获取分页的url | |
#根据抓取的url分别做处理:将url页面中的真实图片名称获取 | |
#将上一步的名称替换到指定的图片地址格式中,开始下载图片 | |
# | |
import re | |
import os | |
import urllib.request |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
API: | |
获取参数 process.argv | |
运行nodejs时,node xxx.js yyy | |
argv[0] : node | |
argv[1] : xxx.js //当前脚本名 | |
argv[2] : yyy //文件名,不包含后缀 | |
…… | |
读取文件 fs readFileSync 该方法会返回一个流对象,通过toString()可以转换为字符串 | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Component, OnInit, OnDestroy } from '@angular/core'; | |
import {Http} from "@angular/http"; | |
import { LocalCacheService } from "./local-cache.service"; | |
@Component({ | |
selector: 'app-example', | |
templateUrl: './app.component.html', | |
styleUrls: ['./app.component.scss'] | |
}) | |
export class ExampleComponent implements OnInit, OnDestroy { |