sudo apt-get install libjpeg-dev build-essential python-dev libffi-dev libssl-dev libxml2-dev libxslt1-dev vim git tmux python-virtualenv python-pip -y
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
# -*- coding: utf-8 -*- | |
from lxml import html | |
import requests | |
class VJCrawl(): | |
def __init__(self): | |
self.s = requests.Session() | |
self.url = 'https://flightstatus.vietjetair.com/?lang=vi' | |
self.user_agent = ("Mozilla/5.0 (X11; Linux x86_64) " |
Here is your homework, in each section, try to solve all the easy level problems.
If you have any question, please paste your code and output to https://glot.io/new/python then send to me via messenger.
Let's go!
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
# -*- coding: utf-8 -*- | |
import scrapy | |
from scrapy_splash import SplashRequest | |
script = """ | |
function main(splash) | |
splash:init_cookies(splash.args.cookies) | |
local url = splash.args.url | |
assert(splash:go(url)) | |
assert(splash:wait(5)) |
Hoang Quoc Viet [email protected] Hanoi March 7th, 1995 VietNam +84 1694 97 0010
#Test
NewerOlder