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
from bs4 import BeautifulSoup | |
import requests | |
r = requests.get("https://stackoverflow.com/questions/47503845/save-html-content-into-a-txt-file-using-python") | |
data = r.text | |
soup = BeautifulSoup(data) | |
print(soup) | |
with open ('/tmp/test.html', 'a') as f: | |
f.write(str(soup)) |
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 requests | |
import json | |
from bs4 import BeautifulSoup | |
import sys | |
''' | |
url= "https://www.skptricks.com/search/label/React%20Native" | |
r = requests.get(url) | |
soup = BeautifulSoup(r.content) |
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 tornado.httpserver | |
import tornado.ioloop | |
import tornado.options | |
import tornado.web | |
import pymongo | |
from bson.objectid import ObjectId | |
from tornado_cors import CorsMixin | |
from tornado.options import define, options | |
import json |
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
require 'socket' | |
server = TCPServer.new 5678 | |
while session = server.accept | |
request = session.gets | |
puts request | |
session.print "HTTP/1.1 200\r\n" # 1 | |
session.print "Content-Type: text/html\r\n" # 2 |
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
<?php | |
//for in file functions.php of theme or create new plugin add | |
//include_once ("admin-page-more/options_template.php"); | |
function myplugin_register_settings() { | |
add_option( 'myplugin_option_name', 'This is my option value.'); | |
add_option( 'myplugin_option_name_01', ''); | |
add_option( 'myplugin_option_email_1', ''); |
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
<?php | |
/** | |
* Theme basic setup. | |
* | |
* @package understrap | |
*/ | |
// Exit if accessed directly. | |
defined( 'ABSPATH' ) || exit; |
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
// Write Javascript code here | |
const request = require('request'); | |
const cheerio = require('cheerio'); | |
const fs = require('fs'); | |
const URL = "https://danhngoncuocsong.vn/chu-de/danh-ngon-cong-viec_1.html"; | |
/* | |
var i; |
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
var head = document.head || document.getElementsByTagName('head')[0]; | |
var body = document.body || document.getElementsByTagName('body')[0]; | |
var style = document.createElement('link'); | |
style.setAttribute('rel', 'stylesheet'); | |
style.setAttribute('href', '//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/tomorrow.min.css'); | |
var script = document.createElement('script'); | |
script.setAttribute('src', '//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/highlight.min.js'); | |
head.append(style); | |
head.append(script); |
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
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> | |
<html lang="{{ locale }}" dir="{{ direction }}" class="{{ checkout_html_classes }}"> | |
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0, height=device-height, minimum-scale=1.0, user-scalable=0"> | |
<title>{{ shop.name }} - {{ page_title }}</title> | |
{{ content_for_header }} |
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
var pageURL = window.location.href; | |
var lastURLSegment = pageURL.substr(pageURL.lastIndexOf('/') + 1); | |
console.log(lastURLSegment); |
OlderNewer