11.Nas_1


새창 작성 수정 목록 링크 Edit G카랜다 HDD HDD HDD 게시물 주소 복사


시놀로지 python3 beautifulsoup 설치 작업으로 epg xmltv.xml만들기

♨ 카랜더 일정 :
  • 링크

  • 첨부

  • 컨텐츠 정보

    본문

    시놀로지  python3  beautifulsoup 설치 작업으로 epg xmltv.xml만들기

    시놀로지 beautifulsoup 설치 작업

    시놀로지 ssh 접속후 아래 처럼 명령 실행.


    easy_install beautifulsoup

    easy_install lxml 

    wget https://bootstrap.pypa.io/get-pip.py

    python3 get-pip.py

    pip install BeautifulSoup4

    pip install lxml

    ...설치가 되지 않는다,,,,,,,

    root@homepc_11qkr:/volume1/web/epg3# easy_install beautifulsoup
    Searching for beautifulsoup
    Reading https://pypi.python.org/simple/beautifulsoup/
    Downloading https://files.pythonhosted.org/packages/40/f2/6c9f2f3e696ee6a1fb0e4d7850617e224ed2b0b1e872110abffeca2a09d4/BeautifulSoup-3.2.2.tar.gz#sha256=a04169602bff6e3138b1259dbbf491f5a27f9499dea9a8fbafd48843f9d89970
    Best match: BeautifulSoup 3.2.2
    Processing BeautifulSoup-3.2.2.tar.gz
    Writing /opt/tmp/easy_install-6IqDcl/BeautifulSoup-3.2.2/setup.cfg
    Running BeautifulSoup-3.2.2/setup.py -q bdist_egg --dist-dir /opt/tmp/easy_install-6IqDcl/BeautifulSoup-3.2.2/egg-dist-tmp-VrdyKV
    /opt/tmp/easy_install-6IqDcl/BeautifulSoup-3.2.2/BeautifulSoup.py:114: UserWarning: You are using a very old release of Beautiful Soup, last updated in 2011. If you installed the 'beautifulsoup' package through pip, you should know the 'beautifulsoup' package name is about to be reclaimed by a more recent version of Beautiful Soup which is incompatible with this version.
    
    This will happen at some point after January 1, 2021.
    
    If you just started this project, this is easy to fix. Install the 'beautifulsoup4' package instead of 'beautifulsoup' and start using Beautiful Soup 4.
    
    If this is an existing project that depends on Beautiful Soup 3, the project maintainer (potentially you) needs to start the process of migrating to Beautiful Soup 4. This should be a relatively easy part of the Python 3 migration.
    
      """)
    /usr/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'long_description_content_type'
      warnings.warn(msg)
    zip_safe flag not set; analyzing archive contents...
    /usr/local/lib/python2.7/site-packages/setuptools/command/bdist_egg.py:395: UnicodeWarning: Unicode equal comparison failed to convert both arguments to Unicode - interpreting them as being unequal
      symbols = dict.fromkeys(iter_symbols(code))
    Copying BeautifulSoup-3.2.2-py2.7.egg to /usr/lib/python2.7/site-packages
    Adding BeautifulSoup 3.2.2 to easy-install.pth file
    
    Installed /usr/lib/python2.7/site-packages/BeautifulSoup-3.2.2-py2.7.egg
    Processing dependencies for beautifulsoup
    Finished processing dependencies for beautifulsoup
    root@homepc_11qkr:/volume1/web/epg3# easy_install lxml
    Searching for lxml
    Best match: lxml 3.6.0
    Adding lxml 3.6.0 to easy-install.pth file
    
    Using /usr/local/lib/python2.7/site-packages
    Processing dependencies for lxml
    Finished processing dependencies for lxml
    root@homepc_11qkr:/volume1/web/epg3# wget https://bootstrap.pypa.io/get-pip.py
    --2021-03-31 22:16:18--  https://bootstrap.pypa.io/get-pip.py
    Resolving bootstrap.pypa.io... 151.101.0.175, 151.101.64.175, 151.101.128.175, ...
    Connecting to bootstrap.pypa.io|151.101.0.175|:443... connected.
    HTTP request sent, awaiting response... 200 OK
    Length: 1927630 (1.8M) [text/x-python]
    Saving to: 'get-pip.py'
    
    get-pip.py                               100%[==================================================================================>]   1.84M  1.14MB/s    in 1.6s
    
    2021-03-31 22:16:20 (1.14 MB/s) - 'get-pip.py' saved [1927630/1927630]
    
    root@homepc_11qkr:/volume1/web/epg3# python get-pip.py
    ERROR: This script does not work on Python 2.7 The minimum supported Python version is 3.6. Please use https://bootstrap.pypa.io/pip/2.7/get-pip.py instead.
    root@homepc_11qkr:/volume1/web/epg3# python3 get-pip.py
    Collecting pip
      Downloading pip-21.0.1-py3-none-any.whl (1.5 MB)
         |████████████████████████████████| 1.5 MB 358 kB/s
    Collecting setuptools
      Downloading setuptools-54.2.0-py3-none-any.whl (785 kB)
         |████████████████████████████████| 785 kB 175 kB/s
    Collecting wheel
      Downloading wheel-0.36.2-py2.py3-none-any.whl (35 kB)
    Installing collected packages: wheel, setuptools, pip
      WARNING: The script wheel is installed in '/var/packages/py3k/target/usr/local/bin' which is not on PATH.
      Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
      WARNING: The scripts pip, pip3 and pip3.8 are installed in '/var/packages/py3k/target/usr/local/bin' which is not on PATH.
      Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
    Successfully installed pip-21.0.1 setuptools-54.2.0 wheel-0.36.2
    root@homepc_11qkr:/volume1/web/epg3# pip install BeautifulSoup4
    -ash: pip: command not found
    
    1차실패
    2차 진행

    Synology NAS에서 Python3와 PIP

    1. Synology NAS에서 [제어판] - [터미널 및 SNMP] 의 [터미널] 탭에서 [SSH 서비스 활성화]를 체크하여 SSH 를 활성화한다.

    2. Synology NAS의 패키지 센터에서 [Python3] 를 설치한다.

    3. Putty 등을 이용하여 SSH 연결

    4. PIP설치 진행
     - wget https://bootstrap.pypa.io/get-pip.py
     - sudo python3 get-pip.py

    5. PIP를 이용하여 파이썬 패키지 설치
     - requests 패키지 설치 : sudo python3 -m pip install requests
     - BeautifulSoup 패키지 설치 :
    wget https://www.crummy.com/software/BeautifulSoup/bs4/download/4.6/beautifulsoup4-.6.0.tar.gz
     - lxml 패키지 설치 : sudo python3 -m pip install lxml
     - mysql 패키지 설치 : sudo python3 -m pip install pymysql


    =================

    3단계 설치
    "/volume1/@appstore/py3k/usr/local/bin/pip3" install bs4


    6. 원하는 모듈 실행
     python3   실행으로 xmltv,xml을 만들어 봅니다.
    #!/bin/sh
    # tv_grab_file for epg2xml to xmltv.xml
    cd /volume1/web/epg3
    #python3 -u $EPG2XML_SCRIPT $args -o /epg2xml/xml/xmltv.xml
    #/epg2xml/epg2xml.py
    #-i ALL -o /epg2xml/xml/xmltv.xml
    python3 -u /volume1/web/epg3/epg2xml.py -i ALL -o /volume1/web/epg3/xmltv3.xml


    python3 -u /volume1/web/epg3/epg2xml.py -i ALL -o /volume1/web/epg3/xmltv3.xml 


    3232235521_1617198201.6891.png
    3232235521_1617198998.2507.png


    기본 설치 조건은 wiserain/tvheadend  설치 조건에  정상적인  tvheadend 동작 상태 입니다
    3232235521_1617198934.1444.png
    3232235521_1617198857.7156.png

    이하 설치작업 히스토리 입니다
    반복 실수한 내용으로 캡춰 메모 합니다....이하 작업으로 
    cd /volume1/web/epg3
    94 pip install requests beautifulsoup4
    95 /volume1/@appstore/py3k/usr/local/bin/pip3" install bs4
    ..."가 빠져 실수 "/volume1/@appstore/py3k/usr/local/bin/pip3" install bs4
    97 easy_install beautifulsoup
    98 easy_install lxml
    99 wget https://bootstrap.pypa.io/get-pip.py
    101 python3 get-pip.py
    102 pip install BeautifulSoup4
    106 wget https://bootstrap.pypa.io/get-pip.py
    107 python3 get-pip.py
    108 python3 -m pip install requests
    109 wget https://www.crummy.com/software/BeautifulSoup/bs4/download/4.6/beautifulsoup4-4.6.0.tar.gz
    110 python3 -m pip install lxml
    111 python3 -m pip install pymysql
    112 python3 main.py
    114 sh xmltv.sh

    wget https://www.crummy.com/software/BeautifulSoup/bs4/download/4.6/beautifulsoup4-4.6.0.tar.gz
    pip install BeautifulSoup4
    python3 get-pip.py

    wget https://bootstrap.pypa.io/get-pip.py
    반복시 파일 확인....1.2.3 필요/복사
    cp get-pip.py.3 get-pip.py

    python3 get-pip.py
    python3 -m pip install requests

    테스트
    sh xmltv.sh
    2021/03/31 22:35:46 ERROR 78 BeautifulSoup 모듈이 설치되지 않았습니다.

    python3
    Python 3.8.6 (default, Jan 4 2021, 16:11:49)
    [GCC 4.9.3 20150311 (prerelease)] on linux
    Type "help", "copyright", "credits" or "license" for more information.
    >>> from bs4 import BeautifulSoup
    Traceback (most recent call last):
    File "<stdin>", line 1, in <module>
    ModuleNotFoundError: No module named 'bs4'
    >>>
    "/volume1/@appstore/py3k/usr/local/bin/pip3" install libxml2
    "/volume1/@appstore/py3k/usr/local/bin/pip3" install bs4
    sh xmltv.sh
    성공,,,,,
    132 history

    설치 요약
    python3 으로 확인
    from bs4 import BeautifulSoup

    설치
    "/volume1/@appstore/py3k/usr/local/bin/pip3" install bs4

    동작확인
    python3 -u /volume1/web/epg3/epg2xml.py -i ALL -o /volume1/web/epg3/xmltv3.xml 

    3232235521_1617200389.9395.png
    3232235521_1617200355.372.png

    [ 추가 정보 ... 더보기) ]
    뷰PDF 1,2



    office view

    관련자료

    댓글목록

    profile_image

    오늘복님의 댓글

    no_profile 오늘복 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 아이피 (203.♡.128.40) 작성일

    감사합니다.

    목록

    새창 작성 수정 목록 링크 Edit G카랜다 HDD HDD HDD 게시물 주소 복사




    Total 1,676 / 11 Page
    [ php.ini 간편수정)시 해놀로지 dsm6 php.ini 파일 업로드 용량 간편하게 변경하기 및 put… ] 댓글 2

    php.ini 간편수정)시 해놀로지 dsm6 php.ini 파일 업로드 용량 간편하게 변경하기 및 putty 최신 버전 다운로드 사이트 링크 참…

    [ 가상머신vmware 백업과 복원,복제 ]

    너무나 좋은 자료 링크 펌업 합니다>\r\n>\r\n>\r\n♠ 출처는 링크 참조 바랍니다. https://11q.kr ♠

    [ 나스전용 case 에서 미니데스크탑 케이스로 변경 ]

    > 나스용 케이스 추전 는 미니데스크탑 추천드립니다기존 2Mons 미니서버 (13만)에서 미니타위 (4만)로교체 완료 교체비용케이스 (4만…

    [ 리눅스에서 폴더 찾기 리눅스에서 파일 찾기 ]

    리눅스에서 폴더 찾기전체 폴더에서 찾기find / -name 폴더명 -type d현재 폴더(및 하위폴더)에서 찾기find ./ -name 폴더명…

    [ 그노보드 설치시 시놀로지서버 gd 문제점 대응 ..아것 때문에 3시간 소비 ]

    그노보드 설치시 시놀로지서버 gd 문제점 대응 ..아것 때문에 3시간 소비패티지에서 웹스테이션 php설정 gd 포함 모두 설정 ( dsm 6.1…

    [ XPEnology(해놀로지) 6.1(6.1.1) Jun’s Mod 1.02 Alpha 버전으로 sata 하드… ]

    sata 하드 개수 인식 늘리기 입니다.XPEnology(해놀로지) 6.1(6.1.1) Jun’s Mod 1.02 Alpha 버전으로 설치시 주…

    [ 복원성공) phpmyadmin에서 가져오기가 에러시 내보내기 옵션 설정 ]

    안녕하세요아래와 같이 phpmyadmin에서 가져오기가 에러납니다조언 부탁 드립니다오류SQL 질의:CREATE TABLE `g4_apms_cac…

    [ 용량부족으로 외장하드를 기본볼륨으로 만들기 ]

    -용량부족으로 인해 외장하드를 기본볼륨으로 사용할 방법을 찾고있습니다.오태화2015-08 조회 2998 추천 0/etc/synoinfo.conf…

    [ 서버이전 성공 추천) 헤놀로지 physical disk 추가하여 1개의 HDD로 구성 사용하기 ] 댓글 4

    헤놀로지 physical disk 추가하여 1개의 HDD로 구성 사용하기 장 점 : 기본 헤놀리지 구성파일을 ssd에 설치 파일도 적게 구성 되…

    [ ★★★★★성공) u5pvr linux 완전초기화 설치및 mysql apache2 + php5 phpm… ] 댓글 8

    성공) u5pvr linux 완전초기화 설치및 mysql apache2 + php5 phpmyadmin 설치하기 APM1 재설치 하기 입니다u…

    [ 성공)DS3615xs 6.02 Jun's Mod V1.0_pat8451.zip DSM6 시놀로지/ 헤놀로지 … ] 댓글 2

    본자료는 참조만 하세요=========저의 최종 dsm 6.0 업데이트 가능한성공)DS3615xs 6.02 Jun's Mod V1.0_pat84…

    [ pc에서 windows용 plex설치 하여 pc폴더와 u5pvr 구글안드로이드 tv 영화 라이브러리 동시 … ]

    pc에서 windows용 plex설치 하여 pc폴더와 u5pvr 구글안드로이드 tv 영화 라이브러리 동시 사용및 플러그인 설치 방법 메뉴얼ht…

    [ epg일부 채널 정보 한글깨짐 문의/docker tvheadend조건 ] 댓글 2

    ■일부 채널이 한글 제목이 깨짐니다개선 / 설정 사례 조언 부탁 드립니다▶https://github.com/wonipapa/epg2xml/iss…

    [ 작업중_실패)링크 4개 사용에 관한 질문입니다. ]

    ■/bbs/write_update.php 에서 db엡뎃시키지 말고해당스킨에서 업뎃시켜보세요/스킨/write_update.skin.php <…

    [ NAS 보안을 위해해야 ​​할 6 가지 사항 ]

    NAS 보안을 위해해야 ​​할 6 가지 사항에 의해크레이그 로이드에2018 년 5 월 11 일NAS는 아마도 홈 네트워크에서 가장 중요한 장치 …

    [ pc power 소모 전력 측정 ]

    제가 사용하는 서재의 전기 소모 전력량 입니다157w 전체적 ds712 모니터 naspc 사용중 순서로 office 합니다131wind ds71…

    [ * 추천_성공)[U5] U5PVR 웹 파일 관리 : droppy 설치하기 및 사용기 삽질기 설치 성공입니다. ] 댓글 4

    작업_성공_사용기 )[U5]U5PVR 웹 파일 관리 : droppy 재설치 완료 및 자동 실행 변경잘 사용 하던 droppy가 동작 하지 않아서…

    [ 작성중)u5pvr사용기 사례 입니다 ]

    ◎ ■ ▶ ☞ ♠ 정보찾아 공유 드리며 출처는 링크 참조 바랍니다. https://11q.kr ♠


    ♥간단_메모글♥


    최근글


    새댓글



    PHP 안에 HTML ☞ 홈페이지 화면갱신 시간은 ♨
    ▶ 2024-06-26 22:44:48

    오늘의 홈 현황


    • 현재 접속자♨ 821 명
    • 오늘 가입자※ 2 명
    • 어제 가입자※ 2 명
    • 주간 가입자※ 8 명
    • 오늘 방문자 2,364 명
    • 어제 방문자 2,051 명
    • 최대 방문자 13,042 명
    • 전체 방문자 4,396,971 명
    • 전체 게시물※ 8,658 개
    • 전체 댓글수※ 24,773 개
    • 전체 회원수 11,070 명

    QR코드


    ☞ QR코드 스캔은 kakao앱 자체 QR코드

    알림 0








    최신글↑