미분류

230209

Berylly 2023. 2. 10. 12:27

T.김동식

 

jQuery

 

 

$.grep, 배열반환

var str1=$.map(arr1, function(a, b){
                if(a.area=="a1"){
                    return a.area;
                }
                });
                 console.log(str1)
                 
var str2=$.grep(arr1, function(a, b){
                if(a.area=="b1"){
                    return JSON.stringify(a.area);
                }
                });
                console.log(str2)

 

 

 

python

import scrapy
import urllib.request

class Book4Spider(scrapy.Spider):
    name = 'book4'
    allowed_domains = ['wikibook.co.kr']
    start_urls = ['http://wikibook.co.kr/list']
    
    def parse(self, response):
        li_list = response.css('.col-md-1')
        for i in li_list[:5]:
            url=i.css('::attr(src)').extract_first()
            # print(url)
            li=url.split('/')
            file_name=li[-1]
            urllib.request.urlretrieve(url, 'D:/# 박상희/2. 실습/data/bookImage/'+file_name)
            yield print(url, file_name)
scrapy crawl book4

 

 

 

R tools 다운

https://cran.r-project.org/bin/windows/Rtools/rtools43/rtools.html

 

Rtools43 for Windows

Rtools is a toolchain bundle used for building R packages from source (those that need compilation of C/C++ or Fortran code) and for build R itself. Rtools43 is used for R-devel, the development version of R since revision 83535 and is intended for R 4.3.0

cran.r-project.org

 

파이어폭스 드라이버

https://github.com/mozilla/geckodriver/releases

 

Releases · mozilla/geckodriver

WebDriver for Firefox. Contribute to mozilla/geckodriver development by creating an account on GitHub.

github.com